-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile.toml
85 lines (71 loc) · 2.53 KB
/
Makefile.toml
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
[env]
# all workspace members can use this Makefile
CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = "true"
PORT = "8000"
# ---- BUILD & CREATE WASMS ----
[tasks.build]
description = "Build"
workspace = false
command = "cargo"
args = ["build"]
[tasks.build_release]
description = "Build, with the --release flag"
workspace = false
command = "cargo"
args = ["build", "--release"]
[tasks.create_wasm]
description = "Build with wasm-pack"
install_crate = "wasm-pack"
command = "wasm-pack"
args = ["build", "--target", "no-modules", "--out-name", "package", "--dev"]
[tasks.create_wasm_release]
description = "Build with wasm-pack"
install_crate = "wasm-pack"
command = "wasm-pack"
args = ["build", "--target", "no-modules", "--out-name", "package"]
[tasks.all]
description = "Build, and create wasms"
workspace = false
dependencies = ["build", "create_wasm"]
[tasks.watch]
description = "Build, create wasms, and watch/recompile files for changes"
workspace = false
dependencies = ["build", "create_wasm"]
watch = { ignore_pattern="pkg/*" }
[tasks.all_release]
description = "Build, and create wasms, with the --release flag"
workspace = false
dependencies = ["build_release", "create_wasm_release"]
[tasks.serve]
description = "Start server"
install_crate = { crate_name = "microserver", binary = "microserver", test_arg = "-h" }
workspace = false
command = "microserver"
args = ["--port", "${PORT}"]
# ---- TEST ----
[tasks.test]
description = "Run tests. Ex: 'cargo make test firefox'. Test envs: [chrome, firefox, safari]"
clear = true
workspace = false
install_crate = { crate_name = "wasm-pack", binary = "wasm-pack", test_arg = "-V" }
command = "wasm-pack"
args = ["test", "--${@}"]
[tasks.test_release]
extend = "test"
description = "Run tests in release mode. Ex: 'cargo make test firefox'. Test envs: [chrome, firefox, safari]"
args = ["test", "--${@}", "--release"]
[tasks.test_h]
description = "Run headless tests. Ex: 'cargo make test_h firefox'. Test envs: [chrome, firefox, safari]"
extend = "test"
args = ["test", "--headless", "--${@}"]
[tasks.test_h_release]
extend = "test_h"
description = "Run headless tests in release mode. Ex: 'cargo make test_h firefox'. Test envs: [chrome, firefox, safari]"
args = ["test", "--headless", "--${@}", "--release"]
[tasks.test_one]
description = "Run Seed's tests. Ex: 'cargo make test firefox'. Test envs: [chrome, firefox, safari]"
clear = true
workspace = false
install_crate = { crate_name = "wasm-pack", binary = "wasm-pack", test_arg = "-V" }
command = "wasm-pack"
args = ["test", "--firefox", "--headless", "--", "--lib", "${@}"]