J.A.R.V.I.S-rust/crates/jarvis-gui
Bossiara13 a3bdf90237 build(gui): build.rs auto-runs npm run build, no more stale frontend bundle
Reproduction:
  cargo build --release -p jarvis-gui   # before this commit
  → Tauri'\''s generate_context!() reads frontend/dist/client which is
    whatever the user (or me) last built, possibly hours ago. Result:
    new release exe ships with stale UI. Caught when /commands page
    kept rendering the placeholder after the new code was committed
    and the binary was rebuilt — because dist/ was generated before
    the Svelte file was rewritten.

Fix: build.rs now invokes `npm run build` in frontend/ on every
relink, and emits cargo:rerun-if-changed for frontend/src and
package.json so cargo also reruns build.rs when Svelte/TS sources
change. `cargo tauri build` still works (it runs npm twice, which
is wasteful but harmless). If npm is not installed (unlikely but
possible on a Rust-only CI), prints a cargo warning and bundles
whatever dist is on disk.

`dist` stays in frontend/.gitignore — this just makes sure a local
working copy always has a fresh dist before Tauri picks it up.
2026-05-15 13:18:08 +03:00
..
capabilities Tray options implementation + Voice system rewrite + build fixes 2026-01-07 23:29:46 +05:00
gen/schemas chore: gitignore tauri-generated schema files 2026-04-22 17:55:56 +03:00
src feat: 5 new packs + dotenvy + regen icon.ico + shortcuts redo 2026-05-15 12:28:44 +03:00
build.rs build(gui): build.rs auto-runs npm run build, no more stale frontend bundle 2026-05-15 13:18:08 +03:00
Cargo.toml feat: 5 new packs + dotenvy + regen icon.ico + shortcuts redo 2026-05-15 12:28:44 +03:00
Makefile.toml project restructure with Rust workspaces 2026-01-04 05:19:47 +05:00
tauri.conf.json Tray options implementation + Voice system rewrite + build fixes 2026-01-07 23:29:46 +05:00