diff --git a/scouter/src/lib.rs b/scouter/src/lib.rs index 77f4f76..fb58bc8 100644 --- a/scouter/src/lib.rs +++ b/scouter/src/lib.rs @@ -21,6 +21,22 @@ impl ProjectType { None } + + pub fn build_command(&self) -> Vec { + 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 { + 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)]