Chore: cleanup the CLI package

This commit is contained in:
Jonathan Kelley committed 2021-01-19 08:50:56 -05:00
1 parent be8d2678b5
commit 18ad810768
16 files changed
+8 -6

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
use diopack::cli::{LaunchCommand, LaunchOptions};
use dioxus_cli as diopack;
#[async_std::main]
async fn main() -> diopack::error::Result<()> {
diopack::logging::set_up_logging();
let opts: LaunchOptions = argh::from_env();
let mut config = diopack::config::Config::new()?;
match opts.command {
LaunchCommand::Build(options) => {
config.with_build_options(&options);
diopack::builder::build(&config, &(options.into()))?;
}
LaunchCommand::Develop(options) => {
config.with_develop_options(&options);
diopack::develop::start(&config, &(options.into())).await?;
}
_ => {
todo!("Command not currently implemented");
}
}
Ok(())
}