2014-10-27 02:57:44 +00:00
|
|
|
# Install dependencies.
|
2014-08-29 02:55:45 +00:00
|
|
|
install:
|
|
|
|
npm install
|
2014-10-22 03:16:42 +00:00
|
|
|
|
2014-10-27 02:57:44 +00:00
|
|
|
# Watch the app sources and build with source maps.
|
2014-10-27 03:10:41 +00:00
|
|
|
watch:
|
|
|
|
./node_modules/.bin/watchify -e ./src/app.coffee -o public/js/app.bundle.js -d -v
|
2014-08-29 02:55:45 +00:00
|
|
|
|
2014-10-27 02:57:44 +00:00
|
|
|
# Serve locally.
|
2014-08-29 02:55:45 +00:00
|
|
|
serve:
|
|
|
|
cd public; python -m SimpleHTTPServer 8000
|
|
|
|
|
2014-10-27 03:10:41 +00:00
|
|
|
# Make a minified package.
|
|
|
|
build:
|
2014-10-27 02:57:44 +00:00
|
|
|
grunt init
|
2014-10-27 03:10:41 +00:00
|
|
|
./node_modules/.bin/browserify -e ./src/app.coffee -o public/js/app.bundle.js
|
|
|
|
grunt
|
2014-10-27 02:57:44 +00:00
|
|
|
grunt minify
|
2014-10-27 03:10:41 +00:00
|
|
|
|
|
|
|
# Publish on Firebase or GitHub Pages.
|
|
|
|
publish:
|
|
|
|
# firebase deploy -> http://burnchart.firebaseapp.com
|
|
|
|
git subtree push --prefix public origin gh-pages
|
|
|
|
|
|
|
|
# Run mocha test.
|
|
|
|
test:
|
|
|
|
./node_modules/.bin/mocha --compilers coffee:coffee-script/register --reporter spec --ui exports --timeout 20000 --slow 15000 --bail
|
|
|
|
|
|
|
|
.PHONY: test
|