-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consolidating bin shell scripts, cake bootstrap
- Loading branch information
Showing
57 changed files
with
6,474 additions
and
5,994 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
client: bin/client.sh | ||
server: bin/server.sh | ||
client: bin/client.sh start | ||
server: bin/server.sh start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,39 @@ | ||
#!/bin/bash | ||
|
||
cd client | ||
stasis -p ../public -d | ||
# If command is 'start' and (development or no env specified) | ||
if [ $1 = 'start' ] && ([ "$NODE_ENV" = 'development' ] || [ -z "$STATE" ]); then | ||
cd client | ||
stasis -p ../public -d | ||
fi | ||
|
||
# If command is 'start' and production | ||
if [ $1 = 'start' ] && [ "$NODE_ENV" = 'production' ]; then | ||
cd client | ||
stasis -p ../public | ||
fi | ||
|
||
# If command is 'new' | ||
if [ $1 = 'new' ]; then | ||
cd ../ && \ | ||
git init $2 && \ | ||
cd $2 && \ | ||
git remote add origin $3 && \ | ||
git remote add template git://github.com/winton/node_template.git && \ | ||
git fetch template && \ | ||
git merge template/master && \ | ||
cake install && \ | ||
echo -e "\n\033[1;32mSuccess!\033[0m" && \ | ||
echo -e "\n\033[1;33mStart your server:\033[0m cd ../$1 && cake start\n" | ||
fi | ||
|
||
# If command is 'bootstrap' | ||
if [ $1 = 'bootstrap' ]; then | ||
pwd=`pwd` | ||
cd $2 | ||
make bootstrap | ||
cp -f bootstrap/css/bootstrap.css $pwd/client/css/lib | ||
cp -f bootstrap/css/bootstrap-responsive.css $pwd/client/css/lib | ||
rm -rf $pwd/client/js/lib/bootstrap | ||
mkdir -p $pwd/client/js/lib/bootstrap | ||
cp -f bootstrap/js/*.js $pwd/client/js/lib/bootstrap | ||
fi |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
#!/bin/bash | ||
|
||
./node_modules/.bin/supervisor -e 'js|coffee' -w 'server,node_modules' server/app.js | ||
# If command is 'start' and (development or no env specified) | ||
if [ $1 = 'start' ] && ([ "$NODE_ENV" = 'development' ] || [ -z "$STATE" ]); then | ||
./node_modules/.bin/supervisor -e 'js|coffee' -w 'server,node_modules' server/app.js | ||
fi | ||
|
||
# If command is 'start' and production | ||
if [ $1 = 'start' ] && [ "$NODE_ENV" = 'production' ]; then | ||
export NODE_PATH=/usr/lib/node_modules | ||
export NODE_ENV=production | ||
PORT=$2 /usr/bin/node server/app.js >> log/production.$1.log 2>&1 | ||
fi |
Oops, something went wrong.