Permalink
Browse files

Install jscoverage on demand during make test instead of making it a …

…dev dependency
  • Loading branch information...
1 parent e131df1 commit 0caf741ef33242ea3edc523b672d9c5fa77feca3 @richtera richtera committed Jul 22, 2012
Showing with 10 additions and 6 deletions.
  1. +10 −5 Makefile
  2. +0 −1 package.json
View
15 Makefile
@@ -2,19 +2,24 @@
REPORTER = spec
MOCHA_FLAGS = -t 5000 -s 500
-test:
+jscoverage: ./node_modules/jscoverage/jscoverage.node
+
+./node_modules/jscoverage/jscoverage.node:
+ npm install jscoverage
+
+test: jscoverage
@NODE_ENV=mocha ./node_modules/.bin/mocha \
--reporter $(REPORTER) $(MOCHA_FLAGS)
-test-debug-brk:
+test-debug-brk: jscoverage
@NODE_ENV=mocha ./node_modules/.bin/mocha \
--reporter $(REPORTER) $(MOCHA_FLAGS) --debug-brk
-test-debug:
+test-debug: jscoverage
@NODE_ENV=mocha ./node_modules/.bin/mocha \
--reporter $(REPORTER) $(MOCHA_FLAGS) --debug
-test-cov:
+test-cov: jscoverage
-rm -rf lib-cov
jscoverage --no-highlight lib lib-cov
-NODE_ENV=mocha CALIPSO_COV=1 ./node_modules/.bin/mocha --reporter html-cov -t 5000 -s 500 > docs/coverage.html
@@ -32,4 +37,4 @@ site:
&& rm -rf gh-pages \
&& echo "Pages Updated"
-.PHONY: site test test-cov test-debug test-debug-brk lib-cov
+.PHONY: site test test-cov test-debug test-debug-brk lib-cov jscoverage
View
1 package.json
@@ -22,7 +22,6 @@
},
"devDependencies": {
"mocha": "*",
- "jscoverage": "*",
"should": "*"
},
"dependencies": {

0 comments on commit 0caf741

Please sign in to comment.