-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
38 additions
and
890 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
use std::process::Command; | ||
|
||
fn run(cmd: &mut Command, msg: &str) { | ||
let status = cmd.status().expect(&format!("failed to execute: {msg}")); | ||
if !status.success() { | ||
panic!("process exited with status: {}; {}", status, msg); | ||
} | ||
} | ||
|
||
fn main() { | ||
if Command::new("tsc").arg("--version").status().is_err() { | ||
println!("cargo:warning=typescript not found, installing..."); | ||
run( | ||
Command::new("npm") | ||
.arg("install") | ||
.arg("-g") | ||
.arg("typescript"), | ||
"npm install failed", | ||
); | ||
} | ||
|
||
run(Command::new("tsc").arg("-p").arg("ts"), "build failed"); | ||
run(Command::new("node").arg("gen-dts.mjs"), "gen-dts failed"); | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.