1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! Builds the directory a static server serves.
//!
//! This crate takes source folders of CSS, JS, and hand-authored assets and produces one
//! output directory: CSS bundled and/or minified, JS minified or bundled from an entry
//! point, everything else mirrored byte-for-byte. It delegates transformation to external
//! CLI tools (`lightningcss`, `esbuild`) rather than embedding a bundler, keeping the
//! crate free of any particular bundler's dependency weight and release cadence.
//!
//! It speaks no HTTP and knows nothing about serving. It composes with a static server —
//! `mini-static`, or any other — through the filesystem: this crate writes a directory,
//! the server serves one. Neither depends on the other.
//!
//! # Scope
//!
//! *Produce the directory a static server serves.* That sentence decides what belongs
//! here: an asset folder mirrored byte-for-byte is in scope even though nothing
//! transforms it, because the output directory is not complete without it. Serving that
//! directory, watching it for a browser's benefit, or deciding cache headers for it are
//! all somebody else's job.
//!
//! # Example
//!
//! ```no_run
//! # fn example() -> Result<(), Box<dyn std::error::Error>> {
//! use mini_build::{Builder, CssOptions, CssTool};
//! use std::path::Path;
//!
//! Builder::new(Path::new("./public"))?
//! .source_folder(Path::new("./src/styles"))?
//! .css_tool(CssTool::LightningCss, CssOptions::default())
//! .build()?;
//! # Ok(())
//! # }
//! ```
pub use Builder;
pub use ;
pub use ;
pub use BuildError;
pub use ;
pub use ;
pub use ToolError;
pub use WatchHandle;