From a4f3d0d18e51cce49783a21d16c7bf68722024ff Mon Sep 17 00:00:00 2001 From: Tristan Cavelier <tristan.cavelier@tiolive.com> Date: Tue, 11 Jun 2013 10:30:13 +0200 Subject: [PATCH] Makefile: notes added about npm packages + make phantom improved --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 892eca9..4e8da8b 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,8 @@ COMPLEX_MIN = complex_queries.min.js PARSER_PAR = $(QUERIES_DIR)/parser.par PARSER_OUT = $(QUERIES_DIR)/parser.js +## install npm package system wide -> npm -g install <package> + ## js/cc using rhino #JSCC_CMD = rhino ~/modules/jscc/jscc.js -t ~/modules/jscc/driver_web.js_ # sh -c 'cd ; npm install jscc-node' @@ -19,6 +21,8 @@ JSCC_CMD = node ~/node_modules/jscc-node/jscc.js -t ~/node_modules/jscc-node/ LINT_CMD = $(shell which jslint || echo node ~/node_modules/jslint/bin/jslint.js) --terse # sh -c 'cd ; npm install uglify-js' UGLIFY_CMD = $(shell which uglifyjs || echo node ~/node_modules/uglify-js/bin/uglifyjs) +# sh -c 'cd ; npm install phantomjs' +PHANTOM_CMD = $(shell which phantomjs || echo ~/node_modules/phantomjs/bin/phantomjs) auto: compile build lint build: concat uglify @@ -57,7 +61,7 @@ lint: $(LINT_CMD) $(LINT_FILES) phantom: - ~/node_modules/phantomjs/bin/phantomjs test/run-qunit.js test/jiotests_withoutrequirejs.html | awk 'BEGIN {print "<!DOCTYPE html><html>"} /^<head>$$/, /^<\/body>$$/ {print} END {print "</html>"}' | sed -e 's,^ *<\(/\|\)script.*>$$,,g' > test/unit_test_result.html + $(PHANTOM_CMD) test/run-qunit.js test/jiotests_withoutrequirejs.html | awk 'BEGIN {print "<!DOCTYPE html><html>"} /^<head>$$/, /^<\/body>$$/ {print} END {print "</html>"}' | sed -e 's,^ *<\(/\|\)script.*>$$,,g' > test/unit_test_result.html grep '^ <title>✔ ' test/unit_test_result.html > /dev/null .phony: clean -- 2.30.9