1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
use dioxus_studio::*;
use structopt::StructOpt;
#[tokio::main]
async fn main() -> Result<()> {
let args = Trunk::from_args();
set_up_logging();
match args.action {
TrunkSubcommands::Build(_) => {
//
}
TrunkSubcommands::Translate(opts) => {
// let TranslateOptions {
// file,
// text,
// component,
// } = cfg;
// 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);
// }
// }
}
TrunkSubcommands::Clean(_) => {
//
}
TrunkSubcommands::Config(_) => {
//
}
TrunkSubcommands::Serve(_) => {
//
}
}
Ok(())
}