pub struct BuildConfig { /* private fields */ }
Expand description
config for building tailwind
// example
BuildConfig::new().with_cdn_src("https://my.cdn.com").build()?;
Implementations§
Source§impl BuildConfig
impl BuildConfig
Sourcepub fn with_path(self, p: Option<impl AsRef<Path>>) -> Self
pub fn with_path(self, p: Option<impl AsRef<Path>>) -> Self
changes the path from which the css file is loaded
specifying a file makes it required
specifying None
looks for a style.css
file
at the root of of the project
if the file does not exist it uses the the default:
@tailwind base;
@tailwind components;
@tailwind utilities;
Sourcepub fn with_cdn_src(self, s: impl Into<String>) -> Self
pub fn with_cdn_src(self, s: impl Into<String>) -> Self
specifies the cdn used as a source for the jit builds
Sourcepub fn with_tw_config(self, config: Value) -> Self
pub fn with_tw_config(self, config: Value) -> Self
specifies the config used by tailwind, the config needs to be specified as json
as it is used by both the jit and the normal config
({src_dir}
expands to the actual /src
of the project)
// default config:
json!({
"content": ["{src_dir}/**/*.{html,js,rs}"],
"theme": { "extend": {} },
"plugins": [],
})
Trait Implementations§
Source§impl Clone for BuildConfig
impl Clone for BuildConfig
Source§fn clone(&self) -> BuildConfig
fn clone(&self) -> BuildConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for BuildConfig
impl Debug for BuildConfig
Auto Trait Implementations§
impl Freeze for BuildConfig
impl RefUnwindSafe for BuildConfig
impl Send for BuildConfig
impl Sync for BuildConfig
impl Unpin for BuildConfig
impl UnwindSafe for BuildConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more