-
Notifications
You must be signed in to change notification settings - Fork 243
/
Makefile
80 lines (66 loc) · 1.96 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
74
75
76
77
78
79
80
REPORTER ?= dot
TESTS ?= $(shell find test -name "*-test.js")
all: \
later.js \
later.min.js \
later-core.js \
later-core.min.js \
component.json \
bower.json \
package.json
.PHONY: clean all test test-cov
test: later.js
@NODE_ENV=test ./node_modules/.bin/mocha --reporter $(REPORTER) $(TESTS)
test-cov: later-cov.js
@LATER_COV=1 $(MAKE) test REPORTER=html-cov > coverage.html
later-cov.js: later.js
@rm -f $@
@jscoverage --no-highlight src src-cov \
--no-instrument=later.js \
--no-instrument=later-core.js \
--no-instrument=modifier/index.js \
--no-instrument=array/index.js \
--no-instrument=date/index.js \
--no-instrument=constraint/index.js \
--no-instrument=parse/index.js \
--no-instrument=core/index.js \
--no-instrument=compat/index.js \
--no-instrument=start.js \
--no-instrument=end.js \
--no-instrument=component.js \
--no-instrument=package.js
node_modules/.bin/smash src-cov/later.js > later-cov.js
@chmod a-w $@
benchmark: all
@echo 'Constraints --------'
@node benchmark/constraint/next-bench.js
@echo 'Schedules --------'
@node benchmark/core/schedule-bench.js
later.js: $(shell node_modules/.bin/smash --list src/later.js)
@rm -f $@
node_modules/.bin/smash src/later.js | node_modules/.bin/uglifyjs - -b indent-level=2 -o $@
@chmod a-w $@
later.min.js: later.js
@rm -f $@
node_modules/.bin/uglifyjs $< -c -m -o $@
later-core.js: $(shell node_modules/.bin/smash --list src/later-core.js)
@rm -f $@
node_modules/.bin/smash src/later-core.js | node_modules/.bin/uglifyjs - -b indent-level=2 -o $@
@chmod a-w $@
later-core.min.js: later-core.js
@rm -f $@
node_modules/.bin/uglifyjs $< -c -m -o $@
component.json: src/component.js later.js
@rm -f $@
node src/component.js > $@
@chmod a-w $@
package.json: src/package.js later.js
@rm -f $@
node src/package.js > $@
@chmod a-w $@
bower.json: src/bower.js later.js
@rm -f $@
node src/bower.js > $@
@chmod a-w $@
clean:
rm -f later*.js package.json component.json bower.json