Merge pull request #1840 from zed-industries/build-themes-in-assets-crate
Generate themes before compiling the 'assets' crate
This commit is contained in:
parent
df837283e8
commit
8e7f711371
2 changed files with 29 additions and 28 deletions
29
crates/assets/build.rs
Normal file
29
crates/assets/build.rs
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
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");
|
||||||
|
}
|
|
@ -1,5 +1,3 @@
|
||||||
use std::process::Command;
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
println!("cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET=10.15.7");
|
println!("cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET=10.15.7");
|
||||||
|
|
||||||
|
@ -26,30 +24,4 @@ fn main() {
|
||||||
|
|
||||||
// Register exported Objective-C selectors, protocols, etc
|
// Register exported Objective-C selectors, protocols, etc
|
||||||
println!("cargo:rustc-link-arg=-Wl,-ObjC");
|
println!("cargo:rustc-link-arg=-Wl,-ObjC");
|
||||||
|
|
||||||
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");
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue