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: boolBuild 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 the “default value” for a type. Read more
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
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
fn from_iter_safe<I>(iter: I) -> Result<Self, Error> where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
fn from_iter_safe<I>(iter: I) -> Result<Self, Error> where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
Gets the struct from any iterator such as a Vec of your making. Read more
Auto Trait Implementations
impl RefUnwindSafe for ConfigOptsBuild
impl Send for ConfigOptsBuild
impl Sync for ConfigOptsBuild
impl Unpin for ConfigOptsBuild
impl UnwindSafe for ConfigOptsBuild
Blanket Implementations
Mutably borrows from an owned value. Read more
