new tasks, frontend crate platform features
This commit is contained in:
parent
ea38f61058
commit
e034a2bb14
|
@ -29,6 +29,15 @@ run_task = { fork = true, parallel = true, name = [
|
|||
"watch_tauri_glue",
|
||||
]}
|
||||
|
||||
[tasks.start_web]
|
||||
description = "Run without Tauri in the browser & watch Typescript and Rust in the debug mode"
|
||||
dependencies = ["store_current_process_id"]
|
||||
run_task = { fork = true, parallel = true, name = [
|
||||
"tauri_dev_with_cleanup",
|
||||
"watch_pixi_canvas",
|
||||
"watch_tauri_glue",
|
||||
]}
|
||||
|
||||
[tasks.bundle]
|
||||
description = "Compile in the release mode and create installation packages"
|
||||
dependencies = ["tauri_build", "show_release_paths"]
|
||||
|
@ -46,10 +55,13 @@ description = "Run locally installed tauri"
|
|||
command = "tauri/bin/cargo-tauri"
|
||||
args = ["${@}"]
|
||||
|
||||
[tasks.mzoon_for_tauri]
|
||||
description = "Run locally installed mzoon with enabled `frontend` feature `platform_tauri"
|
||||
extend = "mzoon_with_disabled_frontend_features"
|
||||
|
||||
[tasks.mzoon]
|
||||
description = "Run locally installed mzoon"
|
||||
command = "mzoon/bin/mzoon"
|
||||
args = ["${@}"]
|
||||
description = "Run locally installed mzoon with enabled `frontend` feature `platform_browser"
|
||||
extend = "mzoon_with_disabled_frontend_features"
|
||||
|
||||
# [tasks.mzoon]
|
||||
# description = "Run mzoon from a cloned MoonZoon repo"
|
||||
|
@ -58,6 +70,11 @@ args = ["${@}"]
|
|||
|
||||
###### HELPER TASKS ######
|
||||
|
||||
[tasks.mzoon_with_disabled_frontend_features]
|
||||
description = "Run locally installed mzoo"
|
||||
command = "mzoon/bin/mzoon"
|
||||
args = ["${@}"]
|
||||
|
||||
[tasks.store_current_process_id]
|
||||
description = ""
|
||||
script_runner = "@duckscript"
|
||||
|
@ -72,11 +89,20 @@ description = "Run `tauri dev`"
|
|||
extend = "tauri"
|
||||
args = ["dev"]
|
||||
|
||||
[tasks.mzoon_start]
|
||||
description = "Run `mzoon start`"
|
||||
extend = "mzoon"
|
||||
args = ["start"]
|
||||
|
||||
[tasks.tauri_dev_with_cleanup]
|
||||
description = "Run forked `tauri dev` with cleanup"
|
||||
run_task = { fork = true, cleanup_task = "cleanup_after_tauri_dev", name = ["tauri_dev"] }
|
||||
run_task = { fork = true, cleanup_task = "kill_watchers", name = ["tauri_dev"] }
|
||||
|
||||
[tasks.cleanup_after_tauri_dev]
|
||||
[tasks.mzoon_start_with_cleanup]
|
||||
description = "Run forked `mzoon start` with cleanup"
|
||||
run_task = { fork = true, cleanup_task = "kill_watchers", name = ["mzoon_start"] }
|
||||
|
||||
[tasks.kill_watchers]
|
||||
description = "Kill the cargo-make/makers process and all its children / forked processes"
|
||||
script_runner = "@duckscript"
|
||||
script = '''
|
||||
|
|
|
@ -8,6 +8,9 @@ mod browser;
|
|||
#[cfg(feature = "platform_browser")]
|
||||
use browser as platform;
|
||||
|
||||
#[cfg(all(feature = "platform_tauri", feature = "platform_browser"))]
|
||||
compile_error!("feature \"foo\" and feature \"bar\" cannot be enabled at the same time");
|
||||
|
||||
pub async fn show_window() {
|
||||
platform::show_window().await
|
||||
}
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
"build": {
|
||||
"frontendDist": "../frontend_dist",
|
||||
"devUrl": "http://localhost:8080",
|
||||
"beforeDevCommand": "makers mzoon start",
|
||||
"beforeBuildCommand": "makers mzoon build -r -f"
|
||||
"beforeDevCommand": "makers mzoon_for_tauri start",
|
||||
"beforeBuildCommand": "makers mzoon_for_tauri build -r -f"
|
||||
},
|
||||
"app": {
|
||||
"macOSPrivateApi": true,
|
||||
|
|
Loading…
Reference in a new issue