diff options
| author | ojacobson <ojacobson@noreply.codeberg.org> | 2025-05-30 21:12:57 +0200 |
|---|---|---|
| committer | ojacobson <ojacobson@noreply.codeberg.org> | 2025-05-30 21:12:57 +0200 |
| commit | 7a5c82d9b86e0a0828f4ccaac42b2db398945406 (patch) | |
| tree | b80ffb244b9826cd553502505533e1199d4c722f /build.rs | |
| parent | ebb6a0bff2dd14afec3f0bb1db556797ac2f34ab (diff) | |
| parent | 4396c912771f136f7d397a67f247c81532520b85 (diff) | |
Call `vite` directly to build the frontend.
Calling through `npm` wasn't adding anything other than complexity, and it made it somewhat harder to follow what tools did what.
I'm also pretty sure `tools/build-ui` was totally unused.
This was originally part of [another proposal][pr-6]. I've broken it out to make the intent clearer, and to make the proposal easier to get a handle on in isolation from other, related changes. Thanks to @wlonk for their input on this!
[pr-6]: https://codeberg.org/ojacobson/pilcrow/pulls/6
Merges prop/build-without-npm into main.
Diffstat (limited to 'build.rs')
| -rw-r--r-- | build.rs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -20,7 +20,7 @@ fn main() -> Result<(), io::Error> { ))); } - // rerun `npm run build` whenever the UI changes. + // rerun `vite build` whenever the UI changes. // // `node_modules` is always touched if `npm install` runs, leading to spurious // rebuilds. (This duplicate is purely organizational; it reflects that the ui @@ -32,7 +32,7 @@ fn main() -> Result<(), io::Error> { println!("cargo::rerun-if-changed=svelte.config.js"); println!("cargo::rerun-if-changed=vite.config.js"); println!("cargo::rerun-if-changed=ui"); - let status = Command::new("npm").args(["run", "build"]).status()?; + let status = Command::new("npx").args(["vite", "build"]).status()?; if !status.success() { return Err(io::Error::other(format!( "'npm run build' exited with status {status:?}" |
