forked from xtuc/webassemblyjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
81 lines (60 loc) · 1.81 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
NODE_OPTS =
TEST_TIMEOUT = 10000
TRACE = 0
LERNA = ./node_modules/.bin/lerna
FLOWTYPED = ./node_modules/.bin/flow-typed
NODE = node
PRETTIER = ./node_modules/.bin/prettier --ignore-path .prettierignore
BABEL = ./node_modules/.bin/babel --ignore src/types/npm
ESLINT = ./node_modules/.bin/eslint
HTTP_SERVER = ./node_modules/.bin/http-server -d-1
MARKDOWN_TO_HTML = ./node_modules/.bin/markdown
SPEC_TEST_DIR = testsuite
REPL = $(NODE) ./packages/repl/lib/bin.js
.PHONY: test build
clean-all:
rm -rf ./node_modules ./packages/*/node_modules ./packages/*/{lib,esm}
bootstrap: clean-all
yarn install
$(LERNA) bootstrap
build:
WITH_TRACE=$(TRACE) ./scripts/build.sh
watch:
WITH_TRACE=$(TRACE) ./scripts/build.sh --watch
test-ci: test test-whitelisted-spec lint
test-ci-windows: test test-whitelisted-spec
test-pnpm: clean-all
yarn install
npm i -g pnpm
$(LERNA) exec pnpm install
make build lint
test: build
./scripts/test.sh --timeout $(TEST_TIMEOUT)
test-whitelisted-spec:
$(REPL) $(SPEC_TEST_DIR)/exports.wast
$(REPL) $(SPEC_TEST_DIR)/globals.wast
$(REPL) $(SPEC_TEST_DIR)/i32.wast
$(REPL) $(SPEC_TEST_DIR)/binary.wast
$(REPL) $(SPEC_TEST_DIR)/typecheck.wast
$(REPL) $(SPEC_TEST_DIR)/comments.wast
$(REPL) $(SPEC_TEST_DIR)/inline-module.wast
$(REPL) $(SPEC_TEST_DIR)/store_retval.wast
$(REPL) $(SPEC_TEST_DIR)/utf8-custom-section-id.wast
$(REPL) $(SPEC_TEST_DIR)/utf8-import-field.wast
$(REPL) $(SPEC_TEST_DIR)/utf8-import-module.wast
lint:
$(ESLINT) packages
publish: build
lerna publish --force-publish=* --exact
repl: build
$(NODE) $(NODE_OPTS) ./lib/repl
generate-doc:
$(MARKDOWN_TO_HTML) README.md
serve-docs:
$(HTTP_SERVER) docs
bench:
$(NODE) $(NODE_OPTS) ./benchmark
fix:
$(PRETTIER) --write "{packages,docs,benchmark}/**/*.js" "**/*.tjs"
flow-update-def:
$(FLOWTYPED) install --libdefDir src/types