forked from JacksonTian/eventproxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (35 loc) · 1.05 KB
/
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
42
43
44
45
46
47
48
49
TESTS = test/test.js
REPORTER = spec
TIMEOUT = 10000
MOCHA_OPTS =
COMPONENT = ./node_modules/.bin/component
build: index.js components
@$(COMPONENT) build --dev
components: component.json
@$(COMPONENT) install --dev
clean:
@rm -rf components build
install-test:
@NODE_ENV=test npm install --registry=http://r.cnpmjs.org
test: install-test
@NODE_ENV=test ./node_modules/.bin/mocha \
--reporter $(REPORTER) \
--timeout $(TIMEOUT) \
$(MOCHA_OPTS) \
$(TESTS)
test-cov: install-test
@$(MAKE) test MOCHA_OPTS='--require blanket' REPORTER=html-cov | ./node_modules/.bin/cov
cov: test-cov
test-all: test test-component test-cov
test-component: build
@./node_modules/.bin/mocha-phantomjs test/test_component.html
test-component-browser:
@open test/test_component.html
totoro: install-test build
@./node_modules/.bin/totoro --runner=test/test_component.html
autod: install-test
@./node_modules/.bin/autod -w -e components,build
@$(MAKE) install-test
contributors: install-test
@./node_modules/.bin/contributors -f plain -o AUTHORS
.PHONY: clean test