-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
73 lines (54 loc) · 1.09 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
TESTS = test/*.js
REPORTER = spec
BENCHMARKS = benchmark/*.js
#
# Tests
#
test: test-node test-browser
test-node:
@printf "\n ==> [Node.js]"
@NODE_ENV=test ./node_modules/.bin/mocha \
--require ./test/bootstrap \
--reporter $(REPORTER) \
$(TESTS)
test-browser: build
@printf "\n ==> [Phantom.Js]"
@./node_modules/.bin/mocha-phantomjs \
--R ${REPORTER} \
./test/browser/index.html
test-cov: lib-cov
@DRIP_COV=1 NODE_ENV=test ./node_modules/.bin/mocha \
--require ./test/bootstrap \
--reporter html-cov \
$(TESTS) \
> coverage.html
$(MAKE) clean-cov
#
# Components
#
build: components lib/*
@./node_modules/.bin/component-build --dev
components: component.json
@./node_modules/.bin/component-install --dev
#
# Coverage
#
lib-cov:
@rm -rf lib-cov
@jscoverage lib lib-cov
#
# Benchmarks
#
bench:
@matcha $(BENCHMARKS)
#
# Clean up
#
clean: clean-components clean-cov
clean-components:
@rm -rf build
@rm -rf components
clean-cov:
@rm -rf lib-cov
@rm -f coverage.html
.PHONY: clean clean-components clean-cov test test-cov test-node test-browser lib-cov bench