-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile.toml
45 lines (40 loc) · 1.15 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
[tasks.build]
description = "Build complete Binoxxo into dist"
dependencies = [
"build_wasm",
"build_css",
"build_assets"
]
[tasks.build_wasm]
description = "Build with wasm-pack"
install_crate = "wasm-pack"
command = "wasm-pack"
args = ["build", "--target", "no-modules", "--out-name", "binoxxo_webapp_seed", "--out-dir", "./dist", "--release"]
[tasks.build_css]
description = "Build css from sass template"
install_crate = { crate_name = "rsass", binary = "rsass", features = ["commandline"], test_arg = "--help" }
script = [ "rsass ./assets/main.scss >./dist/main.css" ]
[tasks.build_assets]
description = "Copy assets into dist dir"
script = [
'''
cp assets/index.html ./dist
cp assets/favicon.png ./dist
cp -r assets/extra/* ./dist
'''
]
[tasks.build_assets.windows]
description = "Copy assets into dist dir"
script = [
'''
copy assets\index.html .\dist
copy assets\favicon.png .\dist
xcopy assets\extra .\dist /E /Y
'''
]
[tasks.serve]
description = "Start server for given example"
install_crate = { crate_name = "https", binary = "http", test_arg = "--help" }
workspace = false
command = "http"
args = ["./dist"]