X-Git-Url: https://git.yukkurigames.com/?p=string-lerp.git;a=blobdiff_plain;f=Makefile;h=96f45a4c12e4a63eb139da3b1e60344a2ffa4021;hp=5dfff0271ddbc49b61fe842ff057bd49c43ddb48;hb=34182258ce91e32a350ce252a29cc73c06795089;hpb=f037d43269bdb28acf28500ce24d2bef1e011a75 diff --git a/Makefile b/Makefile index 5dfff02..96f45a4 100644 --- a/Makefile +++ b/Makefile @@ -4,15 +4,22 @@ 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 -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 < $< > $@ @@ -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