feat: publish cli

This commit is contained in:
Jonathan Kelley committed 2022-01-09 00:23:58 -05:00
1 parent 12be67bf4c
commit 44d7b32992
12 files changed
+240 -191

No files matched your search

+17 -34
View File
@@ -1,49 +1,32 @@
use dioxus_studio::*;
use dioxus_cli::*;
use structopt::StructOpt;
#[tokio::main]
async fn main() -> Result<()> {
let args = Trunk::from_args();
let args = Cli::from_args();
set_up_logging();
match args.action {
TrunkSubcommands::Build(_) => {
//
Commands::Translate(opts) => {
opts.translate();
}
TrunkSubcommands::Translate(opts) => {
// let TranslateOptions {
// file,
// text,
// component,
// } = cfg;
// Commands::Build(_) => {
// //
// }
// match component {
// true => {
// let f = helpers::to_component::convert_html_to_component(&text.unwrap())?;
// println!("{}", f);
// }
// false => {
// let renderer = match (file, text) {
// (None, Some(text)) => translate::translate_from_html_to_rsx(&text, false)?,
// (Some(file), None) => translate::translate_from_html_file(&file)?,
// _ => panic!("Must select either file or text - not both or none!"),
// };
// println!("{}", renderer);
// }
// }
}
// Commands::Clean(_) => {
// //
// }
TrunkSubcommands::Clean(_) => {
//
}
TrunkSubcommands::Config(_) => {
//
}
TrunkSubcommands::Serve(_) => {
//
}
// Commands::Config(_) => {
// //
// }
// Commands::Serve(_) => {
// //
// }
}
Ok(())