This repository has been archived by the owner on Nov 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
executable file
·121 lines (96 loc) · 1.86 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
BIN=./node_modules/.bin
MOCHA=./node_modules/mocha/bin/mocha
all:
make build
make build-test
build:
-make build-ts
make dist-es6
make dist
make dist-dts
build-dev:
$(BIN)/tsc --watch --isolatedModules
dist:
$(BIN)/rollup -c rollup.config.js
dist-es6:
$(BIN)/rollup -c rollup-es6.config.js
dist-shims:
$(BIN)/rollup -c rollup-shims.config.js
build-ts:
tsc
build-ts-watch:
tsc --watch
dist-dts:
# TODO move to dts-bundle.json
./node_modules/.bin/dts-bundle \
--name asyncmachine \
--main build/asyncmachine.d.ts \
--out asyncmachine-bundle.d.ts
compile:
$(BIN)/tsc --noEmit --pretty
compile-watch:
$(BIN)/tsc --watch --noEmit --pretty
setup:
npm install
# make version version=x.x.x
version:
npm --no-git-tag-version --allow-same-version version $(version)
cd pkg && \
npm --no-git-tag-version --allow-same-version version $(version)
package:
make build
rm -Rf pkg-tmp
cp -RL pkg pkg-tmp
publish:
make package
cd pkg-tmp && \
npm publish
test:
@echo "Dont forget to build tests with `make test-build`"
$(MOCHA) \
test/*.js
test-build:
-$(BIN)/tsc \
--isolatedModules \
--skipLibCheck \
-p test
test-build-watch:
-$(BIN)/tsc \
--isolatedModules \
--skipLibCheck \
--watch \
-p test
# make test-grep GREP="test name"
test-grep:
$(MOCHA) \
--grep "$(GREP)"
test/*.js
test-debug:
$(MOCHA) \
--inspect-brk \
--grep "$(GREP)" \
test/*.js
test-grep-debug:
$(MOCHA) \
--debug-brk \
--grep "$(GREP)" \
test/*.js
docs:
rm -R docs/api
mkdir -p docs/api
$(BIN)/typedoc \
--out docs/api \
--ignoreCompilerErrors \
--name AsyncMachine \
--theme minimal \
--excludeNotExported \
--excludePrivate \
--readme none \
--mode file \
src/asyncmachine.ts
pdf:
cd wiki && make pdf
cp \
wiki/AsyncMachine-The-Definitive-Guide.pdf \
docs/AsyncMachine-The-Definitive-Guide.pdf
.PHONY: build test docs