Permalink
Browse files

Makefile and stuff

  • Loading branch information...
1 parent abde35c commit 9038e4b49b6d57947fa40913d53a83ac5070f57a Couto committed Aug 29, 2012
Showing with 292 additions and 711 deletions.
  1. +12 −5 Makefile
  2. +1 −1 build/jpp.js
  3. +248 −662 dist/callipygean.js
  4. +2 −2 dist/callipygean.min.js
  5. +12 −11 lib/callipygean.js
  6. +0 −1 lib/collapsable.js
  7. +2 −2 lib/utils.js
  8. +15 −27 package.json
View
@@ -4,16 +4,16 @@ REPORTER="nyan"
all: lint test min
lint:
- @./node_modules/.bin/jslint dist/callipygean.js
+ @./node_modules/.bin/jshint dist/callipygean.js
test: min
@zsh -c "./node_modules/.bin/mocha -u bdd $(WATCH) --reporter $(REPORTER) ./test/**/*.test.js"
test-b:
@$(min)
@$(MAKE) lint
- @$(MAKE) server &
- @open 'http://localhost:8000/test'
+ @$(MAKE) server
+ @open 'http://localhost:3000/test'
watch:
$(MAKE) test WATCH="-w" REPORTER="min"
@@ -22,17 +22,24 @@ clean:
@rm -r dist
jpp:
- @./build/jpp.js lib/callipygean.js
+ @./build/jpp.js lib/callipygean.js | ./node_modules/.bin/uglifyjs \
+ --beautify \
+ --indent 4 \
+ --no-mangle \
+ --no-mangle-functions \
+ --no-seqs
server:
+ @if [[ $$(ps -ef | grep "node ./node_modules/.bin/serve" | grep -v grep | awk '{print $$2}') -gt 0 ]]; then \$(MAKE) server-stop; fi
@./node_modules/.bin/serve &
server-stop:
@kill $$(ps -ef | grep "node ./node_modules/.bin/serve" | grep -v grep | awk '{print $$2}')
min: clean
@mkdir dist && touch dist/callipygean.min.js
- @./build/jpp.js lib/callipygean.js dist/callipygean.js | xargs ./node_modules/.bin/uglifyjs \
+ @$(MAKE) jpp > dist/callipygean.js
+ @cat dist/callipygean.js | ./node_modules/.bin/uglifyjs \
--output dist/callipygean.min.js \
--mangle-toplevel \
--no-dead-code \
View
@@ -31,6 +31,6 @@ return (!output) ?
process.stdout.write(merged) :
(function () {
fs.writeFileSync(output, merged, 'utf8');
- process.stdout.write(output);
+ process.stdout.write(merged)
process.exit();
}());
Oops, something went wrong.

0 comments on commit 9038e4b

Please sign in to comment.