wip: move out of dioxus main
This commit is contained in:
commit
aebf6678a8
14 files changed
+696
No files matched your search
+28
@@ -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(())
|
||||
}
|
||||
Reference in new issue
Block a user