Commit 187cf662 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

improve Makefile.

parent fc7f59f8
......@@ -4,18 +4,19 @@ RENDERJS_MIN = renderjs.min.js
# npm install uglify-js
UGLIFY_CMD = $(shell which uglifyjs || echo node ~/node_modules/uglify-js/bin/uglifyjs)
# npm install jslint
LINT_CMD = $(shell which jslint || echo node ~/node_modules/jslint/bin/jslint.js) --terse
auto: build
build: uglify
uglify:
$(UGLIFY_CMD) "$(RENDERJS)" > "$(RENDERJS_MIN)"
uglify: $(RENDERJS_MIN)
lint:
$(LINT_CMD) $(RENDERJS)
$(RENDERJS_MIN): $(RENDERJS)
$(UGLIFY_CMD) "$<" > "$@"
clean:
find -name '*~' -delete
find -name 'renderjs.min.js' -delete
lint: $(RENDERJS)
$(LINT_CMD) "$<"
clean:
rm -f $(RENDERJS_MIN)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment