-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.toml
74 lines (56 loc) · 1.52 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
# https://github.com/elastic/elasticsearch-rs/blob/main/Makefile.toml
# https://github.com/ffizer/ffizer/blob/master/Makefile.toml
[config]
default_to_workspace = false
# [env]
# RUST_BACKTRACE = "full"
[tasks.install]
script="""
rustup update
rustup component add rustfmt clippy
cargo install wasm-pack cargo-tarpaulin cargo-deny
pipx install "maturin[patchelf]"
pipx install pre-commit
pre-commit install
"""
[tasks.format]
# install_crate = { crate_name = "rustfmt", rustup_component_name = "rustfmt" }
install_crate = "rustfmt"
command = "cargo"
args = ["fmt"]
[tasks.lint]
install_crate = { rustup_component_name = "clippy" }
command = "cargo"
args = ["clippy"]
[tasks.test]
command = "cargo"
args = ["test"]
dependencies = ["format", "lint"]
[tasks.build]
command = "cargo"
args = ["build"]
dependencies = ["clean"]
[tasks.js]
command = "npm"
args = ["run", "build"]
dependencies = ["format", "install-wasm-pack"]
cwd = "./js/"
[tasks.py]
command = "maturin"
args = ["develop"]
dependencies = ["format"]
cwd = "./python/"
[tasks.docs]
command = "cargo doc --workspace --no-deps --exclude nanopub-cli --exclude nanopub-js --exclude nanopub-sign --target-dir target/doc"
# args = [
# "doc", "--workspace", "--target-dir", "target/doc", "--no-deps",
# "--exclude", "nanopub-cli", "--exclude", "nanopub-js", "--exclude", "nanopub-sign",
# ]
dependencies = ["format"]
[tasks.install-wasm-pack]
install_crate = "wasm-pack"
[tasks.install-tarpaulin]
install_crate = "cargo-tarpaulin"
[tasks.clean]
command = "cargo"
args = ["clean"]