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

+40 -5
View File
@@ -8,22 +8,24 @@ pub struct LaunchOptions {
}
/// The various kinds of commands that `wasm-pack` can execute.
#[derive(FromArgs, PartialEq, Debug)]
#[derive(FromArgs, PartialEq, Debug, Clone)]
#[argh(subcommand)]
pub enum LaunchCommand {
Develop(DevelopOptions),
Build(BuildOptions),
Translate(TranslateOptions),
Test(TestOptions),
Publish(PublishOptions),
Studio(StudioOptions),
}
/// Publish your yew application to Github Pages, Netlify, or S3
#[derive(FromArgs, PartialEq, Debug)]
#[derive(FromArgs, PartialEq, Debug, Clone)]
#[argh(subcommand, name = "publish")]
pub struct PublishOptions {}
/// 🔬 test your yew application!
#[derive(FromArgs, PartialEq, Debug)]
#[derive(FromArgs, PartialEq, Debug, Clone)]
#[argh(subcommand, name = "test")]
pub struct TestOptions {
/// an example in the crate
@@ -35,7 +37,7 @@ pub struct TestOptions {
#[derive(FromArgs, PartialEq, Debug, Clone)]
#[argh(subcommand, name = "build")]
pub struct BuildOptions {
/// an optional direction which is "up" by default
/// the directory output
#[argh(option, short = 'o', default = "String::from(\"public\")")]
pub outdir: String,
@@ -46,10 +48,18 @@ pub struct BuildOptions {
/// develop in release mode
#[argh(switch, short = 'r')]
pub release: bool,
/// hydrate the `dioxusroot` element with this content
#[argh(option, short = 'h')]
pub hydrate: Option<String>,
/// custom template
#[argh(option, short = 't')]
pub template: Option<String>,
}
/// 🛠 Start a development server
#[derive(FromArgs, PartialEq, Debug)]
#[derive(FromArgs, PartialEq, Debug, Clone)]
#[argh(subcommand, name = "develop")]
pub struct DevelopOptions {
/// an example in the crate
@@ -59,4 +69,29 @@ pub struct DevelopOptions {
/// develop in release mode
#[argh(switch, short = 'r')]
pub release: bool,
/// hydrate the `dioxusroot` element with this content
#[argh(option, short = 'h')]
pub hydrate: Option<String>,
/// custom template
#[argh(option, short = 't')]
pub template: Option<String>,
}
/// 🛠 Translate some 3rd party template into rsx
#[derive(FromArgs, PartialEq, Debug, Clone)]
#[argh(subcommand, name = "translate")]
pub struct TranslateOptions {
/// an example in the crate
#[argh(option, short = 'f')]
pub file: Option<String>,
/// an example in the crate
#[argh(option, short = 't')]
pub text: Option<String>,
}
/// 🛠 Translate some 3rd party template into rsx
#[derive(FromArgs, PartialEq, Debug, Clone)]
#[argh(subcommand, name = "studio")]
pub struct StudioOptions {}