Add documentation.
[string-lerp.git] / Makefile
index 5dfff02..96f45a4 100644 (file)
--- 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