-
Notifications
You must be signed in to change notification settings - Fork 160
/
Copy pathMakefile
41 lines (32 loc) · 964 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
TESTS = test/*.js
REPORTER = spec
TIMEOUT = 10000
MOCHA_OPTS =
G =
JSCOVERAGE = ./node_modules/jscover/bin/jscover
install:
@npm install --registry=http://registry.cnpmjs.org --cache=${HOME}/.npm/.cache/cnpm
test: install
@NODE_ENV=test ./node_modules/mocha/bin/mocha \
--reporter $(REPORTER) \
--timeout $(TIMEOUT) $(MOCHA_OPTS) \
$(TESTS)
test-g:
@NODE_ENV=test ./node_modules/mocha/bin/mocha \
--reporter $(REPORTER) \
--timeout $(TIMEOUT) -g "$(G)" \
$(TESTS)
test-cov: lib-cov
@WEIBO_COV=1 $(MAKE) test REPORTER=dot
@WEIBO_COV=1 $(MAKE) test REPORTER=html-cov > coverage.html
lib-cov: install
@rm -rf $@
@$(JSCOVERAGE) lib $@
build:
./node_modules/browserify/bin/cmd.js examples/browser/entry.js -o examples/browser/bundle.js
./node_modules/browserify/bin/cmd.js test/browser/entry.js -o test/browser/bundle.js
publish: build
npm publish
contributors: install
@./node_modules/.bin/contributors -f plain -o AUTHORS
.PHONY: test