-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
56 lines (42 loc) · 1.23 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
export DENO_DIR = ./deno_dir
build: lock.json test deno_dir/dist/binaries/genetic deno_dir/dist/bundles/genetic.js
deno_dir/dist/binaries/%: mod.ts
mkdir -p deno_dir/dist/binaries
deno compile --unstable mod.ts
mv $* $@
deno_dir/dist/bundles/%.js: mod.ts
mkdir -p deno_dir/dist/bundles
deno bundle mod.ts > $@
lock.json: src/deps.ts
rm -rf deno_dir/deps
deno cache --lock=$@ --lock-write $<
deno cache src/deps.ts
git add deno_dir/deps/*
format:
deno fmt --ignore=deno_dir
lint:
deno lint --unstable --ignore=deno_dir
info/%:
deno info $@
doc/%:
deno doc $@
repl:
deno repl --lock=lock.json --unstable --allow-none
clean:
rm -rf deno_dir/gen deno_dir/dl deno_dir/dist coverage
test: format lint
deno test --lock=lock.json --cached-only --allow-none --unstable
EXAMPLES=$(wildcard examples/*.ts)
run-examples: $(EXAMPLES)
for example in $^ ; do \
echo "Running $${example}"; \
deno run --unstable $${example} ; \
done
deno run --unstable --allow-read examples/tsp_webworkers/runner.ts
publish:
land publish
coverage: clean test
deno test --coverage=coverage --unstable
deno coverage --lcov --unstable coverage/ > coverage/coverage.lcov
genhtml -o coverage/html coverage/coverage.lcov
open coverage/html/index.html