Crates.io | packler |
lib.rs | packler |
version | 0.2.0 |
source | src |
created_at | 2023-03-19 08:40:23.126476 |
updated_at | 2023-04-22 20:33:05.413634 |
description | Bundle Rust webapps with xtask |
homepage | |
repository | |
max_upload_size | |
id | 814301 |
size | 75,493 |
Warning This is not ready yet.
A basic xtask main file using Packler:
use packler::{pipelines::assets::bucket::AssetsBucketParams, PacklerConfig, PacklerParams, Run};
fn main() {
dotenv::from_filename(".env.deploy").ok();
env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("info")).init();
let run = Run::new(
PacklerParams::new(
["app.scss", "admin.scss"],
[""; 0], // No WASM frontend
Some("server"),
Some(AssetsBucketParams {
bucket_name: "bucket-with-assets".to_owned(),
bucket_region: "fr-par".to_owned(),
bucket_endpoint_url: "https://s3.fr-par.scw.cloud".to_owned(),
allowed_origins: vec!["http://example.com".to_string()],
}),
),
PacklerConfig::default(),
);
run.start();
}
Run the devserver with $ mdbook serve book/ --open
.