-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
76 lines (60 loc) · 1.73 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
.PHONY: format
.PHONY: sass
.PHONY: cloudflare
.PHONY: screenshot
.DEFAULT_GOAL = build
docker:
open -a docker
www:
npx eslint --fix ./html/javascript/*.js
npx eslint --fix ./html/javascript/components/*.js
npx eslint --fix ./html/javascript/commands/*.js
npx eslint --fix ./test/command/*.js
npx eslint --fix ./test/hint/*.js
sass --no-source-map sass/themes:html/css
build: www
cd rs/vpd && wasm-pack build --target web --dev --out-dir ../../html/wasm/vpd
debug:
npm test
test: build
cd grammars/command && make test
cd grammars/help && make test
npm test
build-all: test
cd grammars/command && make wasm
cd grammars/help && make wasm
cd grammars/hint && make wasm
cd rs/vpd && wasm-pack build --target web --dev --out-dir ../../html/wasm/vpd
cd go && make build-all
build-release:
rm -rf dist/html
mkdir -p dist/darwin/vpd
mkdir -p dist/linux/vpd
mkdir -p dist/windows/vpd
mkdir -p dist/html
cd rs/vpd && wasm-pack build --target web --release --out-dir ../../html/wasm/vpd
cd go && make build-all
rsync -av --exclude *.gitignore \
--exclude LICENSE \
--exclude package.json \
html/* \
dist/html
sass:
find sass -name "*.scss" | entr sass --no-source-map sass/themes:html/css
cloudflare:
rm -rf dist/cloudflare
mkdir -p dist/cloudflare
cp -r html/* dist/cloudflare/
rm -f dist/cloudflare/.gitignore
rm -f dist/cloudflare/LICENSE
rm -f dist/cloudflare/package.json
run-python: build-release
python3 -m http.server 9876 -d html
run-nodejs: build-release
npx http-server html --port 9876
run-go: build-release
cd go && make run
run-cloudflare:
python3 -m http.server 9876 -d dist/cloudflare
run: build
python3 httpd.py