Created
March 29, 2016 05:00
-
-
Save ds0nt/08499a61ccbe44a74ae7 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
trap killgroup SIGINT | |
killgroup(){ | |
echo "killing..." | |
kill 0 | |
} | |
[ -d 'dist' ] || mkdir -p 'dist' | |
if [[ "${NODE_ENV}" == "production" ]]; then | |
cp -urv public/* dist/ | |
browserify -g uglifyify -e src/app.js -t babelify | uglifyjs -c > dist/app.js | |
myth styles/app.css dist/app.css | |
else | |
watchman public 'cp -urv public/* dist/' & | |
watchman src 'browserify -d -e src/app.js -t babelify -o dist/app.js' & | |
watchman styles 'myth styles/app.css dist/app.css' & | |
fi | |
wait |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment