-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.toml
84 lines (70 loc) · 2.29 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
# [env]
# CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = "true"
#
# [tasks.default]
# clear = true
# dependencies = ["build"]
# ---- BUILD ----
[tasks.build]
description = "Build client and server"
clear = true
workspace = false
dependencies = ["build_client", "build_server"]
[tasks.build_release]
extend = "build"
description = "Build client and server in release mode"
dependencies = ["build_client_release", "build_server_release"]
[tasks.build_client]
description = "Build client"
workspace = false
install_crate = { crate_name = "wasm-pack", binary = "wasm-pack", test_arg = "-V" }
command = "wasm-pack"
args = ["build", "client", "--target", "web", "--out-name", "package", "--dev"]
[tasks.build_client_release]
extend = "build_client"
description = "Build client in release mode"
args = ["build", "client", "--target", "web", "--out-name", "package", "--release"]
[tasks.build_server]
description = "Build server"
workspace = false
command = "cargo"
args = ["build", "--package", "server"]
[tasks.build_server_release]
extend = "build_server"
description = "Build server in release mode"
args = ["build", "--package", "server", "--release"]
# ---- START ----
[tasks.start]
description = "Build and start Actix server with client on port 8000"
workspace = false
command = "cargo"
args = ["run", "--package", "server"]
dependencies = ["build"]
[tasks.start_release]
extend = "start"
description = "Build and start Actix server with client on port 8000 in release mode"
args = ["run", "--package", "server", "--release"]
dependencies = ["build_release"]
# ---- LINT ----
[tasks.fmt]
description = "Format with rustfmt"
workspace = false
install_crate = { crate_name = "rustfmt-nightly", rustup_component_name = "rustfmt", binary = "rustfmt", test_arg = "--help" }
command = "cargo"
args = ["fmt", "--all"]
[tasks.fmt_check]
extend = "fmt"
description = "Check format with rustfmt"
args = ["fmt", "--all", "--", "--check"]
[tasks.clippy]
description = "Lint with Clippy"
clear = true
workspace = false
install_crate = { rustup_component_name = "clippy", binary = "cargo-clippy", test_arg = "--help" }
command = "cargo"
args = ["clippy", "--all-features", "--",
"--deny", "warnings",
"--deny", "clippy::pedantic",
"--deny", "clippy::nursery",
"--allow", "clippy::wildcard_imports" # for `use seed::{prelude::*, *};`
]