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:
Adrian Malacoda 2019-02-19 00:44:55 -06:00
parent c399677ab7
commit 7edd1ca475

View File

@ -21,6 +21,22 @@ impl ProjectType {
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)]