introduce webdog cli tool

This commit is contained in:
zyl 2024-11-08 18:16:23 -08:00
parent 8b7620b0bd
commit 399a0c1b87
Signed by: zyl
SSH key fingerprint: SHA256:uxxbSXbdroP/OnKBGnEDk5q7EKB2razvstC/KmzdXXs
26 changed files with 528 additions and 108 deletions

View file

@ -46,7 +46,7 @@ pub struct SiteBuilder {
/// The path to the build directory.
pub build_path: PathBuf,
/// Whether the site is going to be served locally with the dev server.
serving: bool,
pub serving: bool,
/// The resource builders available to the builder.
pub resource_builders: HashMap<String, ResourceBuilder>,
@ -105,7 +105,7 @@ impl SiteBuilder {
std::fs::create_dir(&webdog_path)?;
std::fs::write(
webdog_path.join("webdog.js"),
include_str!("./js/webdog.js"),
include_str!("./embedded/js/webdog.js"),
)?;
let root_path = self.site.site_path.join(ROOT_PATH);