Commit 3f1b27e6 authored by Ivan Tyagov's avatar Ivan Tyagov

Allow jslint form command line.

parent c0c383b2
...@@ -4,6 +4,7 @@ RENDERJS_MIN = renderjs.min.js ...@@ -4,6 +4,7 @@ RENDERJS_MIN = renderjs.min.js
# npm install uglify-js # npm install uglify-js
UGLIFY_CMD = $(shell which uglifyjs || echo node ~/node_modules/uglify-js/bin/uglifyjs) UGLIFY_CMD = $(shell which uglifyjs || echo node ~/node_modules/uglify-js/bin/uglifyjs)
LINT_CMD = $(shell which jslint || echo node ~/node_modules/jslint/bin/jslint.js) --terse
auto: build auto: build
build: uglify build: uglify
...@@ -11,6 +12,9 @@ build: uglify ...@@ -11,6 +12,9 @@ build: uglify
uglify: uglify:
$(UGLIFY_CMD) "$(RENDERJS)" > "$(RENDERJS_MIN)" $(UGLIFY_CMD) "$(RENDERJS)" > "$(RENDERJS_MIN)"
lint:
$(LINT_CMD) $(RENDERJS)
clean: clean:
find -name '*~' -delete find -name '*~' -delete
find -name 'renderjs.min.js' -delete find -name 'renderjs.min.js' -delete
......
...@@ -14,3 +14,5 @@ Developer ...@@ -14,3 +14,5 @@ Developer
> git clone https://git.erp5.org/repos/renderjs.git > git clone https://git.erp5.org/repos/renderjs.git
> make (will produce a minified version for now, requires nodejs installed as well its uglifyjs module) > make (will produce a minified version for now, requires nodejs installed as well its uglifyjs module)
> make lint (will produce a jslint report, requires nodejs installed as well its jslint module)
\ No newline at end of file
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