WIP of project commands. Not sure if this should be in scouter library or in main shenlong binary yet though.
This commit is contained in:
parent
c399677ab7
commit
7edd1ca475
@ -21,6 +21,22 @@ impl ProjectType {
|
|||||||
|
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn build_command(&self) -> Vec<String> {
|
||||||
|
match self {
|
||||||
|
ProjectType::Maven => vec!["mvn".to_owned(), "install".to_owned()],
|
||||||
|
ProjectType::Npm => vec!["npm".to_owned(), "build".to_owned()],
|
||||||
|
ProjectType::Cargo => vec!["cargo".to_owned(), "build".to_owned()]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn run_command(&self) -> Vec<String> {
|
||||||
|
match self {
|
||||||
|
ProjectType::Maven => vec!["mvn".to_owned(), "exec".to_owned()],
|
||||||
|
ProjectType::Npm => vec!["npm".to_owned(), "start".to_owned()],
|
||||||
|
ProjectType::Cargo => vec!["cargo".to_owned(), "run".to_owned()]
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user