mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-30 13:03:16 +00:00
30 lines
764 B
Rust
30 lines
764 B
Rust
|
use std::process::Command;
|
||
|
|
||
|
fn main() {
|
||
|
let output = Command::new("npm")
|
||
|
.current_dir("../../styles")
|
||
|
.args(["install", "--no-save"])
|
||
|
.output()
|
||
|
.expect("failed to run npm");
|
||
|
if !output.status.success() {
|
||
|
panic!(
|
||
|
"failed to install theme dependencies {}",
|
||
|
String::from_utf8_lossy(&output.stderr)
|
||
|
);
|
||
|
}
|
||
|
|
||
|
let output = Command::new("npm")
|
||
|
.current_dir("../../styles")
|
||
|
.args(["run", "build"])
|
||
|
.output()
|
||
|
.expect("failed to run npm");
|
||
|
if !output.status.success() {
|
||
|
panic!(
|
||
|
"build script failed {}",
|
||
|
String::from_utf8_lossy(&output.stderr)
|
||
|
);
|
||
|
}
|
||
|
|
||
|
println!("cargo:rerun-if-changed=../../styles/src");
|
||
|
}
|