forked from NomicFoundation/slang
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
7c8129c
commit bd2a920
Showing
4 changed files
with
88 additions
and
39 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 |
---|---|---|
@@ -1,10 +1,28 @@ | ||
use std::path::Path; | ||
|
||
use infra_utils::commands::Command; | ||
use infra_utils::github::GitHub; | ||
use infra_utils::paths::PathExtensions; | ||
|
||
pub fn setup_npm() { | ||
if GitHub::is_running_in_ci() { | ||
Command::new("npm").arg("ci").run(); | ||
} else { | ||
Command::new("npm").arg("install").run(); | ||
} | ||
|
||
Command::new("npm") | ||
.current_dir(Path::repo_path("submodules/jco")) | ||
.args(["install"]) | ||
.run(); | ||
|
||
Command::new("npm") | ||
.current_dir(Path::repo_path("submodules/jco")) | ||
.args(["run", "build"]) | ||
.run(); | ||
|
||
Command::new("npm") | ||
.current_dir(Path::repo_path("submodules/jco")) | ||
.args(["run", "build:release"]) | ||
.run(); | ||
} |
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