Struct packler::PacklerConfig
source · pub struct PacklerConfig {
pub assets_source_dir: PathBuf,
pub images_dir_name: String,
pub sass_dir_name: String,
pub sass_version: String,
pub target: PathBuf,
pub dist_dir: PathBuf,
pub metadata_filename: String,
}
Expand description
Entry point for the Packler configuration. The configuration covers all the aspects of Packler at once.
Fields§
§assets_source_dir: PathBuf
Directory where are located the assets we want to process (images, css/sass).
Default: the assets
directory at the root of the workspace
images_dir_name: String
The subdirectory of Self::assets_source_dir
that contains
the images that need to be processed.
Default: DEFAULT_IMAGES_DIR
sass_dir_name: String
The subdirectory of Self::assets_source_dir
that contains
the images that need to be processed.
Default: DEFAULT_SASS_DIR
sass_version: String
The Sass version to use
Default DEFAULT_SASS_VERSION
target: PathBuf
The target folder where we put compiled items.
Default: the target as found by Metadata.target_directory().
dist_dir: PathBuf
The final directory where all the processed assets and frontends will be stored. Typically, the content of this directory can be served by a dedicated HTTP server or sent to a CDN.
Default: the DEFAULT_OUTPUT_DIR
directory at the root of the workspace
metadata_filename: String
The name of the final Metadata file. This file will lie in the
Self::dist_dir
.
Implementations§
source§impl PacklerConfig
impl PacklerConfig
pub fn metadata_file(&self) -> PathBuf
pub fn source_image_dir(&self) -> PathBuf
pub fn dist_image_dir(&self) -> PathBuf
pub fn source_sass_dir(&self) -> PathBuf
pub fn dist_sass_dir(&self) -> PathBuf
Trait Implementations§
source§impl Clone for PacklerConfig
impl Clone for PacklerConfig
source§fn clone(&self) -> PacklerConfig
fn clone(&self) -> PacklerConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more