Trying npm.exe on windows
This commit is contained in:
parent
2b1601ee85
commit
1f75f88293
1 changed files with 8 additions and 2 deletions
|
|
@ -10,10 +10,16 @@ fn main() {
|
||||||
|
|
||||||
println!("cargo:rerun-if-changed={}", webui_src_dir.to_str().unwrap());
|
println!("cargo:rerun-if-changed={}", webui_src_dir.to_str().unwrap());
|
||||||
|
|
||||||
|
#[cfg(not(target_os = "windows"))]
|
||||||
|
let npm = "npm";
|
||||||
|
|
||||||
|
#[cfg(target_os = "windows")]
|
||||||
|
let npm = "npm.exe";
|
||||||
|
|
||||||
// Run "npm install && npm run build" in the webui directory
|
// Run "npm install && npm run build" in the webui directory
|
||||||
for (cmd, args) in [
|
for (cmd, args) in [
|
||||||
("npm", ["install"].as_slice()),
|
(npm, ["install"].as_slice()),
|
||||||
("npm", ["run", "build"].as_slice()),
|
(npm, ["run", "build"].as_slice()),
|
||||||
] {
|
] {
|
||||||
// Run "npm install" in the webui directory
|
// Run "npm install" in the webui directory
|
||||||
let output = Command::new(cmd)
|
let output = Command::new(cmd)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue