diff --git a/packages/tribble/src/main.rs b/packages/tribble/src/main.rs index d8389fc..78bd4bf 100644 --- a/packages/tribble/src/main.rs +++ b/packages/tribble/src/main.rs @@ -146,7 +146,9 @@ async fn core(dir: PathBuf) -> Result { delete_tribble_dir(dir)?; 0 } - Subcommand::Deploy { output } => { + Subcommand::Deploy { output, path } => { + // Set the base path in Perseus based on `--path` + env::set_var("PERSEUS_BASE_PATH", path); // Build the app let build_exit_code = crate::build::build(dir.clone())?; if build_exit_code != 0 { diff --git a/packages/tribble/src/options.rs b/packages/tribble/src/options.rs index e38ae4c..f8f62e5 100644 --- a/packages/tribble/src/options.rs +++ b/packages/tribble/src/options.rs @@ -41,6 +41,9 @@ pub enum Subcommand { /// The name of the directory to output Tribble to #[clap(short, long, default_value = "pkg")] output: String, + /// The relative path under which you intend to host Tribble (e.g. `/tribble`). If you're hosting Tribble at the root of a website, set this to `/` + #[clap(short, long)] + path: String, }, /// Deletes the `.tribble/` directory in the case of a corruption Clean,