Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implementation is complete and working quite nicely. Support for multiple proxies when configured from Trunk.toml. Update CHANGELOG describing changes. Update README with docs on how the proxy system works. closes #29 related to #31 closes #33
- Loading branch information
Showing
12 changed files
with
767 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
use std::path::PathBuf; | ||
|
||
use anyhow::Result; | ||
use structopt::StructOpt; | ||
|
||
use crate::config::ConfigOpts; | ||
|
||
/// Trunk config controls. | ||
#[derive(Clone, Debug, StructOpt)] | ||
#[structopt(name = "config")] | ||
pub struct Config { | ||
#[structopt(subcommand)] | ||
action: ConfigSubcommands, | ||
} | ||
|
||
impl Config { | ||
pub async fn run(self, config: Option<PathBuf>) -> Result<()> { | ||
// NOTE WELL: if we ever add additional subcommands, refactor this to match the pattern | ||
// used in main, which is much more scalable. This is faster to code, and will not force | ||
// incompatibility when new commands are added. | ||
match self.action { | ||
ConfigSubcommands::Show => { | ||
let cfg = ConfigOpts::full(config).await?; | ||
println!("{:#?}", cfg); | ||
} | ||
} | ||
Ok(()) | ||
} | ||
} | ||
|
||
#[derive(Clone, Debug, StructOpt)] | ||
enum ConfigSubcommands { | ||
/// Show Trunk's current config pre-CLI. | ||
Show, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
pub mod build; | ||
pub mod clean; | ||
pub mod config; | ||
pub mod serve; | ||
pub mod watch; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.