-
Notifications
You must be signed in to change notification settings - Fork 62
/
Makefile
43 lines (34 loc) · 1.48 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
build:
go run ./bootstrap
go build -o elsa .
release:
go run ./bootstrap
go build --ldflags "-s -w" -o elsa .
benchmark:
# console benchmarks
hyperfine './elsa run ./testing/web/console.js' 'deno run ./testing/web/console.js' 'node ./testing/console.js' -s full -r 100 --warmup 50 --export-json ./benchmarks/console.json
# bundle benchmarks
hyperfine './elsa bundle ./testing/web/console.js' 'deno bundle ./testing/web/console.js' -s full -r 100 --warmup 50 --export-json ./benchmarks/bundle.json -i
# readFile benchmarks
hyperfine './elsa run ./testing/bench/fs.js --fs' 'deno run --allow-read ./testing/bench/fs_deno.js' 'node ./testing/bench/fs_node.js' --warmup 100 -s full -r 100 --export-json ./benchmarks/fs.json
# PI benchmarks
hyperfine 'deno run testing/bench/pi.js' './elsa run testing/bench/pi.js' 'node testing/bench/pi.js' -s full -r 100 --warmup 50 --export-json ./benchmarks/pi.json -i
test:
go test ./testing
./elsa test --fs --net
test-create-out:
./elsa bundle testing/bundle/local_imports.js >> testing/bundle/local_imports.js.out
./elsa bundle testing/bundle/hello.ts >> testing/bundle/hello.ts.out
./elsa bundle testing/bundle/basics.js >> testing/bundle/basics.js.out
clean-cache:
rm -rf /tmp/x.nest.land/
rm -rf /tmp/deno.land/
fmt:
gofmt -w .
prettier --write .
check-fmt:
gofmt -l .
prettier --check .
minify-typescript:
terser --compress --mangle -o ./typescript/typescript.js -- ./typescript/typescript.js
.PHONY: build benchmark clean-cache fmt check-fmt