Skip to content

Commit

Permalink
Add workspace support feature
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyMichaelTDM committed Apr 3, 2023
1 parent b15eb73 commit 201ca5e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions create-rust-app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ plugin_storage = [ "aws-config", "aws-types", "aws-endpoint", "aws-sdk-s3", "tok
plugin_graphql = []
plugin_utoipa = ["utoipa", "utoipa-swagger-ui", "backend_actix-web"]
plugin_tasks = ["fang"]
plugin_workspace_support = []
backend_poem = ["poem", "anyhow", "mime_guess", "tokio"]
backend_actix-web = ["actix-web", "actix-http", "actix-files", "actix-multipart", "actix-web-httpauth","derive_more", "futures", "env_logger"]
backend_axum = ["axum", "axum/ws", "tokio"]
Expand Down
4 changes: 4 additions & 0 deletions create-rust-app/src/dev/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,11 @@ fn get_features(project_dir: &'static str) -> Vec<String> {
let cargo_toml = Manifest::from_path(PathBuf::from_iter([project_dir, "Cargo.toml"]))
.unwrap_or_else(|_| panic!("Could not find \"{}\"", project_dir));
// .expect(&format!("Could not find \"{project_dir}\""));
#[cfg(not(feature = "plugin_workspace_support"))]
let deps = cargo_toml.dependencies;
#[cfg(feature = "plugin_workspace_support")]
let mut deps = cargo_toml.dependencies;
#[cfg(feature = "plugin_workspace_support")]
if let Some(workspace) = cargo_toml.workspace {
// if the manifest has a workspace table, also read dependencies in there
deps.extend(workspace.dependencies);
Expand Down

0 comments on commit 201ca5e

Please sign in to comment.