Struct dioxus_studio::cli::cfg::ConfigOptsBuild[][src]

pub struct ConfigOptsBuild {
    pub target: Option<PathBuf>,
    pub release: bool,
    pub dist: Option<PathBuf>,
    pub public_url: Option<String>,
    pub pattern_script: Option<String>,
    pub pattern_preload: Option<String>,
    pub pattern_params: Option<HashMap<String, String>>,
}
Expand description

Config options for the build system.

Fields

target: Option<PathBuf>

The index HTML file to drive the bundling process [default: index.html]

release: bool

Build in release mode [default: false]

dist: Option<PathBuf>

The output dir for all final assets [default: dist]

public_url: Option<String>

The public URL from which assets are to be served [default: /]

pattern_script: Option<String>

Optional pattern for the app loader script [default: None]

Patterns should include the sequences {base}, {wasm}, and {js} in order to properly load the application. Other sequences may be included corresponding to key/value pairs provided in pattern_params.

These values can only be provided via config file.

pattern_preload: Option<String>

Optional pattern for the app preload element [default: None]

Patterns should include the sequences {base}, {wasm}, and {js} in order to properly preload the application. Other sequences may be included corresponding to key/value pairs provided in pattern_params.

These values can only be provided via config file.

pattern_params: Option<HashMap<String, String>>

Optional replacement parameters corresponding to the patterns provided in pattern_script and pattern_preload.

When a pattern is being replaced with its corresponding value from this map, if the value is prefixed with the symbol @, then the value is expected to be a file path, and the pattern will be replaced with the contents of the target file. This allows insertion of some big JSON state or even HTML files as a part of the index.html build.

Trunk will automatically insert the base, wasm and js key/values into this map. In order in pattern_script and pattern_preload.

These values can only be provided via config file.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Returns clap::App corresponding to the struct.

Builds the struct from clap::ArgMatches. It’s guaranteed to succeed if matches originates from an App generated by StructOpt::clap called on the same type, otherwise it must panic. Read more

Builds the struct from the command line arguments (std::env::args_os). Calls clap::Error::exit on failure, printing the error message and aborting the program. Read more

Builds the struct from the command line arguments (std::env::args_os). Unlike StructOpt::from_args, returns clap::Error on failure instead of aborting the program, so calling .exit is up to you. Read more

Gets the struct from any iterator such as a Vec of your making. Print the error message and quit the program in case of failure. Read more

Gets the struct from any iterator such as a Vec of your making. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.