forked from fluents/chain-able
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
124 lines (88 loc) · 2.59 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# 📜📒 Makefile
# learn more here: https://gist.github.com/isaacs/62a2d1825d04437c6f08
cwd := $(shell pwd)
# --- unused ---
# optimize-js dists/umd/index.js > dists/umd/index.js
# testdistjest:
# yarn run jest -- test/built.js --testPathIgnorePatterns=\"\" --testRegex=\"test/built.js\"
# covava:
# yarn run nyc -- ava
# covreport:
# yarn run nyc -- report
# covtest:
# nyc --reporter=html --reporter=text ava
# pretest:
# $(MAKE) stripbuble
# dist2:
# $(shell make copysrc && make buble)
# --- ops (copy, clean lint, docs) ---
# copy -recursively -forced
copy:
cp -R -f src dists/
copyroot:
yarn run strip -- src/ --pretty --all --out-dir ./ --quiet
copysrc:
yarn run strip -- src/ --pretty --all --out-dir ./dist --quiet
# remove dist, -force -recursively even if it exists and is a folder
clean:
rm -f -r dists/ && rm -f -r dist/ && rm -f -r test-dist/ && node build/cli --clean
lint:
yarn run lint -- src/**.js src/**/*.js
docgen:
node build/cli --docs
dox:
yarn run dox -- 'src/**/*.js' --layout markdown --output docs/bits/doxdox.md
# --- build ---
buble:
yarn run buble -- --input dist --output dist --sourcemap inline --no forOf,dangerousForOf,computedProperty,spreadRest
babel:
yarn run babel -- src/ --out-dir dist
tests:
yarn run test
testdist:
yarn run ava -- test/built.js --verbose
# --- fuseweb ---
fuse:
node build/fuse.js
webpack:
yarn run webpack -- --config build/webpack.config.js --verbose
# --- cli/ci ---
cli:
node build/cli.js
rollupcli:
yarn run rollup -- --config build/cli-rollup.js --environment format:dev
cov:
yarn run jest -- --coverage
jestserialcov:
yarn run jest --coverage --runInBand
jestserial:
yarn run jest --runInBand
coveralls:
yarn run coveralls -- < coverage/lcov.info
quick:
node build/cli.js --quick --test
gzip:
yarn run gzip -- dists/umd/index.js --raw \
&& yarn run gzip -- dists/umd/index.js --raw >> build/size-over-time.txt \
&& date +%Y:%M:%D:%H:%M:%S >> build/size-over-time.txt \
&& echo --- >> build/size-over-time.txt
rollup:
yarn run rollup -- -c build/rollup.config.js
# --- makefile combos/presets ---
# (the above things use names so they are non conflicting, e.g. we cannot have `build`)
stripcombo:
$(MAKE) copysrc && $(MAKE) copyroot
distcombo:
$(MAKE) copysrc && $(MAKE) buble
buildcombo:
$(MAKE) distcombo && $(MAKE) cli
buildcombofuse:
$(MAKE) distcombo && $(MAKE) cli && $(MAKE) fuse && $(MAKE) webpack && $(MAKE) gzip
travis:
$(MAKE) stripcombo \
&& $(MAKE) buildcombo \
&& $(MAKE) testdist \
&& $(MAKE) jestserial
prepublish:
$(MAKE) buildcombo && $(MAKE) cov && $(MAKE) testdist
.PHONY: clean, quick