Skip to content

Instantly share code, notes, and snippets.

@Cezarion
Created September 22, 2015 10:36
Show Gist options
  • Save Cezarion/1228b1992ea460ee3190 to your computer and use it in GitHub Desktop.
Save Cezarion/1228b1992ea460ee3190 to your computer and use it in GitHub Desktop.
Themosis Framework Composer base file + Clone theme from themosis/theme fork
{
"name": "themosis/themosis",
"description": "The Themosis framework. A framework for WordPress developers.",
"keywords": ["themosis", "framework", "WordPress"],
"license": "GPL-2.0+",
"authors": [
{
"name": "Julien Lambé",
"email": "julien@themosis.com",
"homepage": "http://www.themosis.com/"
}
],
"type": "project",
"repositories":[
{
"type": "composer",
"url": "http://wpackagist.org"
},
{
"type": "package",
"package": {
"name": "Cezarion/theme",
"version": "0.1",
"source": {
"url": "git@github.com:Cezarion/theme.git",
"type": "git",
"reference": "dev-0.1"
}
}
}
],
"autoload": {
"psr-0": {
"Thms": "library"
}
},
"scripts" : {
"post-install-cmd" : [
"sh ./npm-configure.sh"
]
},
"config": {
"preferred-install": "dist"
},
"require": {
"php": ">=5.4",
"johnpbloch/wordpress": ">=4.1",
"themosis/framework": "1.1.*",
"Cezarion/theme": "0.1",
"roots/soil": "3.4.0"
},
"extra":{
"installer-paths":{
"htdocs/content/mu-plugins/themosis-{$name}/": ["themosis/framework"],
"htdocs/content/plugins/{$name}/": ["type:wordpress-plugin"],
"htdocs/content/themes/themosis-{$name}/": ["themosis/theme"],
"htdocs/content/themes/{$name}/": ["type:wordpress-theme"]
},
"wordpress-install-dir": "htdocs/cms"
}
}
#!/bin/bash
echo "This script will install and configure the npm dependency for this app"
echo "It change/set the global path for in the current user directory"
echo "And then this configuration is done, install
• npm@ltest
• bower
• gulp
"
echo "If you don't want to change your configuration execute manually : "
echo "npm instal -g npm@latest gulp bower"
echo "----------------------------------------------------------------------------------------"
read -p "/!\ Would you like to change the npm global path for current user and run the install ? (y/n) " -n 1
echo
if [[ $REPLY =~ ^[Nn]$ ]]; then
exit
fi
if grep -q "$npm\-global" ~/.profile
then
echo 'npm-global is already set';
else
echo "Change the default npm global path : create a directory in user root in ~/.npm-global:"
mkdir ~/.npm-global
echo "Configure npm to use the new directory path:"
npm config set prefix '~/.npm-global'
echo "Open or create a ~/.profile file and add this line:"
echo "export PATH=~/npm-global/bin:$PATH" >> ~/.profile
source ~/.profile
fi
echo "now install npm@latest gulp and bower"
npm instal -g npm@latest gulp bower
echo "now install depencies in ${PWD}/htdocs/content/themes/themosaka-theme :"
cd ${PWD}/htdocs/content/themes/themosaka-theme
echo "run npm install :"
npm install
echo "run bower install :"
bower install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment