Skip to main content

JsBuildOptions

Struct JsBuildOptions 

Source
pub struct JsBuildOptions {
Show 15 fields pub app_dir: String, pub entry: Option<String>, pub css: Option<String>, pub dom: Option<String>, pub css_bundle: Option<bool>, pub plugin: Option<String>, pub components: Option<Vec<String>>, pub component_asset_roots: Option<Vec<String>>, pub metafile: Option<bool>, pub css_file_name_template: Option<String>, pub css_public_base: Option<String>, pub legal_comments: Option<String>, pub theme: Option<String>, pub projection_manifests: Option<Vec<String>>, pub projection_manifest_objects: Option<Vec<JsProjectionManifest>>,
}
Expand description

Build options for the webui build API.

Fields§

§app_dir: String

Path to the application folder containing templates.

§entry: Option<String>

Entry HTML file name (defaults to “index.html”).

§css: Option<String>

CSS mode: “link” (default), “style”, or “module”.

§dom: Option<String>

Fallback DOM strategy: “shadow” (default) or “light”.

§css_bundle: Option<bool>

Merge component stylesheets into shared bundled chunks.

Composes with css: bundling decides how stylesheets are grouped, css decides how they reach the page.

§plugin: Option<String>

Plugin identifier (see crate documentation for available identifiers).

§components: Option<Vec<String>>

Additional component sources (npm packages or local paths).

§component_asset_roots: Option<Vec<String>>

Root component tags emitted as static .webui.js ESM assets.

§metafile: Option<bool>

Generate and return an esbuild-compatible component asset metafile.

§css_file_name_template: Option<String>

Link-mode CSS filename template using [name], [hash], [ext].

§css_public_base: Option<String>

Optional base URL/path prefix for Link-mode css hrefs.

§legal_comments: Option<String>

Legal comment handling: “inline” (default) or “none”.

§theme: Option<String>

Design token theme: a JSON file path or npm package name.

§projection_manifests: Option<Vec<String>>

Projection manifest paths.

§projection_manifest_objects: Option<Vec<JsProjectionManifest>>

Inline manifest objects with their logical paths.

Trait Implementations§

Source§

impl FromNapiValue for JsBuildOptions

Source§

unsafe fn from_napi_value( env: napi_env, napi_val: napi_value, ) -> Result<JsBuildOptions>

This function called to convert napi values to native rust values Read more
Source§

fn from_unknown(value: Unknown<'_>) -> Result<Self, Error>

Source§

impl ToNapiValue for JsBuildOptions

Source§

unsafe fn to_napi_value( env: napi_env, val: JsBuildOptions, ) -> Result<napi_value>

This function called to convert rust values to napi values Read more
Source§

fn into_unknown(self, env: &Env) -> Result<Unknown<'_>, Error>

Source§

impl TypeName for JsBuildOptions

Source§

impl ValidateNapiValue for JsBuildOptions

Source§

unsafe fn validate( env: *mut napi_env__, napi_val: *mut napi_value__, ) -> Result<*mut napi_value__, Error>

This function called to validate whether napi value passed to rust is valid type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> JsValuesTupleIntoVec for T
where T: ToNapiValue,

Source§

impl<T> MaybeTypeTag for T

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.