TEST_TARGETS = $(patsubst %.js,build/stamp/%.test,$(SOURCES)) \
$(patsubst tests/%.js,build/stamp/%.test,$(TESTS))
-.PHONY: all check lint test ugly dist clean distclean
+.PHONY: all check lint test ugly dist clean distclean install
all:
@echo "Interesting targets:"
@echo " ugly - generate minified/mangled source files"
@echo " dist - generate redistributables (if git tagged)"
@echo
- @echo "(Running these may download packages from NPM.)"
+ @echo "(Running these may download packages from npm.)"
@echo
%.min.js: %.js | $(UGLIFY)
.SECONDEXPANSION:
build/dist/$(PKGNAME)-%.zip: $$(call git_ls-tree,$$*)
@mkdir -p $(@D)
- git archive --prefix=$(PKGNAME)-$*/ --output=$@ $*
+ $(GIT) archive --prefix=$(PKGNAME)-$*/ --output=$@ $*
.SECONDEXPANSION:
build/dist/$(PKGNAME)-%.tar.gz: $$(call git_ls-tree,$$*)
@mkdir -p $(@D)
- git archive --prefix=$(PKGNAME)-$*/ --output=$@ $*
+ $(GIT) archive --prefix=$(PKGNAME)-$*/ --output=$@ $*
dist: check $(addprefix build/dist/$(PKGNAME)-$(call git_tag,HEAD),.zip .tar.gz)
distclean: clean
$(RM) -r node_modules
+install: check
+ $(NPM) install -g .
+
$(JSTEST):
$(NPM) install jstest