Commit 7aa49403 authored by Tristan Cavelier's avatar Tristan Cavelier

Makefile updated; can use node jslint and node uglify-js

parent dda2573d
OUT = jio.js
UGLY_OUT = jio.min.js
LINT_CMD = jslint --terse
UGLIFY_CMD = uglifyjs
# npm install jslint
LINT_CMD = $(shell which jslint || echo node ~/node_modules/jslint/bin/jslint.js) --terse
# npm install uglify-js
UGLIFY_CMD = $(shell which uglifyjs || echo node ~/node_modules/uglify-js/bin/uglifyjs)
FILE_DIR = src/jio
STORAGE_DIR = src/jio.storage
......@@ -19,7 +21,7 @@ concat:
# uglify jio.js to build jio.min.js
uglify:
$(UGLIFY_CMD) -- "$(OUT)" > "$(UGLY_OUT)"
$(UGLIFY_CMD) "$(OUT)" > "$(UGLY_OUT)"
# lint all files in FILES and STORAGE_FILES
# command: jslint [options] file
......@@ -28,7 +30,7 @@ uglify:
# /*jslint indent: 2, maxlen: 80 */
# /*global hex_sha256: true, jQuery: true */
lint:
$(LINT_CMD) -- $(LINT_FILES:%=$(FILE_DIR)/%.js)
$(LINT_CMD) $(LINT_FILES:%=$(FILE_DIR)/%.js)
.phony: clean
clean:
......
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