Skip to content

Commit

Permalink
feat: added --path flag for setting base path
Browse files Browse the repository at this point in the history
This abstracts away the last visible parts of Perseus.
  • Loading branch information
arctic-hen7 committed Jan 11, 2022
1 parent ab1acaa commit a480cd3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/tribble/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ async fn core(dir: PathBuf) -> Result<i32, Error> {
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 {
Expand Down
3 changes: 3 additions & 0 deletions packages/tribble/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit a480cd3

Please sign in to comment.