Ingen beskrivning

Makefile 542B

12345678910111213141516171819202122232425
  1. PACKAGE = asyncjs
  2. NODEJS = $(if $(shell test -f /usr/bin/nodejs && echo "true"),nodejs,node)
  3. CWD := $(shell pwd)
  4. NODEUNIT = $(CWD)/node_modules/nodeunit/bin/nodeunit
  5. UGLIFY = $(CWD)/node_modules/uglify-js/bin/uglifyjs
  6. NODELINT = $(CWD)/node_modules/nodelint/nodelint
  7. BUILDDIR = dist
  8. all: clean test build
  9. build: $(wildcard lib/*.js)
  10. mkdir -p $(BUILDDIR)
  11. $(UGLIFY) lib/async.js > $(BUILDDIR)/async.min.js
  12. test:
  13. $(NODEUNIT) test
  14. clean:
  15. rm -rf $(BUILDDIR)
  16. lint:
  17. $(NODELINT) --config nodelint.cfg lib/async.js
  18. .PHONY: test build all