X-Git-Url: https://git.yukkurigames.com/?p=string-lerp.git;a=blobdiff_plain;f=Makefile;h=862091d8deaa887165aba65076d70b425467c28f;hp=5dfff0271ddbc49b61fe842ff057bd49c43ddb48;hb=0e8c216ff3039c994a86f423cf66b60f162d0298;hpb=a2ba0c21bc1e59f8269051458266896cb928f905 diff --git a/Makefile b/Makefile index 5dfff02..862091d 100644 --- a/Makefile +++ b/Makefile @@ -4,18 +4,25 @@ JSTEST ?= node_modules/.bin/jstest JSHINT ?= node_modules/.bin/jshint UGLIFY ?= node_modules/.bin/uglifyjs SOURCES = string-lerp.js -MINIFIED = $(SOURCES:.js=.min.js) +UGLIFIED = $(SOURCES:.js=.min.js) TESTS = $(wildcard tests/*.js); LINT_TARGETS = $(addprefix build/stamp/,$(addsuffix .lint,$(SOURCES))) TEST_TARGETS = $(addprefix build/stamp/,$(addsuffix .test,$(SOURCES))) -.PHONY: all check lint test +.PHONY: all check lint test min clean distclean -all: $(MINIFIED) +all: + @echo "Interesting targets:" + @echo " lint - validate source (with jshint)" + @echo " test - run tests (with jstest)" + @echo " ugly - generate minified/mangled source files" + @echo + @echo "(Running these will download packages from NPM.)" + @echo %.min.js: %.js $(UGLIFY) - $(UGLIFY) -m < $< > $@ + $(UGLIFY) --comments -m < $< > $@ build: mkdir -p build/stamp build/dist @@ -31,6 +38,8 @@ build/stamp/%.test: tests/% % build @$(JSTEST) $< > $@ || (cat $@ && rm -f $@ && exit 1) @touch $@ +ugly: $(UGLIFIED) + check: lint test lint: $(JSHINT) $(LINT_TARGETS) @@ -39,7 +48,7 @@ test: $(JSTEST) $(TEST_TARGETS) clean: rm -rf build - rm -f $(MINIFIED) + rm -f $(UGLIFIED) distclean: clean rm -rf node_modules