diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..2016127 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,4 @@ +[toolchain] +channel = "stable" +profile = "default" + diff --git a/xtask/src/main.rs b/xtask/src/main.rs index f5f4f7b..c070801 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -39,6 +39,8 @@ enum Task { /// /// This does not build the packages, use `build` first Start {}, + /// Runs production page under 'www/dist', Run `build` first. + Deploy {}, } #[derive(thiserror::Error)] @@ -98,7 +100,16 @@ fn main() -> Result<(), Error> { cmd.args(["run", "start"]).status().map_err(|e| { Error::Command(format!("{}", cmd.get_program().to_string_lossy()), e) })?; - } + }, + Task::Deploy {} => { + pnpm_install(&args, &workspace)?; + eprintln!("Production Build"); + let mut cmd = Command::new(&args.manager); + cmd.current_dir(&workspace.join("www")); + cmd.args(["run", "build"]).status().map_err(|e| { + Error::Command(format!("{}", cmd.get_program().to_string_lossy()), e) + })?; + }, } Ok(()) }