Replace cargo-web by wasm-pack in build-ui task; drop copy-wasm-assets task
This commit is contained in:
parent
8d9dd0477e
commit
e6bbb62c07
|
@ -5,37 +5,28 @@ workspace = false
|
||||||
clear = true
|
clear = true
|
||||||
workspace = false
|
workspace = false
|
||||||
category = "Build"
|
category = "Build"
|
||||||
description = "Runs the rust compiler for both server and UI"
|
description = "Runs the Rust compiler for both server and UI"
|
||||||
dependencies = ["build-server", "build-ui"]
|
dependencies = ["build-server", "build-ui"]
|
||||||
|
|
||||||
[tasks.build-server]
|
[tasks.build-server]
|
||||||
category = "Build"
|
category = "Build"
|
||||||
description = "Runs the rust compiler for the server"
|
description = "Runs the Rust compiler for the server"
|
||||||
command = "cargo"
|
command = "cargo"
|
||||||
args = ["build", "-p", "stoptime_server"]
|
args = ["build", "-p", "stoptime_server"]
|
||||||
|
|
||||||
[tasks.build-ui]
|
[tasks.build-ui]
|
||||||
category = "Build"
|
category = "Build"
|
||||||
description = "Runs the rust compiler via cargo-web for the UI"
|
description = "Runs the Rust compiler via wasm-pack for the UI"
|
||||||
install-crate = "cargo-web"
|
install-crate = "wasm-pack"
|
||||||
command = "cargo"
|
command = "wasm-pack"
|
||||||
args = ["web", "build", "-p", "stoptime_ui", "--target", "wasm32-unknown-unknown"]
|
args = ["build", "--out-name", "stoptime_ui", "--out-dir", "static", "--target", "web"]
|
||||||
|
cwd = "ui"
|
||||||
[tasks.copy-wasm-assets]
|
|
||||||
description = "Copies the WASM assets generated by cargo-web to the static assets directory"
|
|
||||||
command = "cp"
|
|
||||||
args = [
|
|
||||||
"target/wasm32-unknown-unknown/debug/stoptime_ui.js",
|
|
||||||
"target/wasm32-unknown-unknown/debug/stoptime_ui.wasm",
|
|
||||||
"ui/static"
|
|
||||||
]
|
|
||||||
dependencies = ["build-ui"]
|
|
||||||
|
|
||||||
[tasks.run]
|
[tasks.run]
|
||||||
clear = true
|
clear = true
|
||||||
workspace = false
|
workspace = false
|
||||||
description = "Runs the server"
|
description = "Runs the server"
|
||||||
dependencies = ["copy-wasm-assets"]
|
dependencies = ["build"]
|
||||||
command = "cargo"
|
command = "cargo"
|
||||||
args = ["run", "-p", "stoptime_server"]
|
args = ["run", "-p", "stoptime_server"]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue