wip: studio upgrades

This commit is contained in:
Jonathan Kelley committed 2021-12-29 12:03:18 -05:00
1 parent 0966653630
commit 5fdb14446b
14 files changed
+499 -70

No files matched your search

+4 -20
View File
@@ -1,28 +1,12 @@
use dioxus_studio as diopack;
use dioxus_studio::cli::{LaunchCommand, LaunchOptions};
use dioxus_studio::{set_up_logging, LaunchCommand, LaunchOptions};
#[async_std::main]
async fn main() -> diopack::error::Result<()> {
diopack::logging::set_up_logging();
async fn main() -> dioxus_studio::Result<()> {
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");
}
}
dioxus_studio::Studio::new(opts).start().await?;
Ok(())
}