-
✨ Features
-
Add config file for configuring include / exclude of files to template - xortive, pull/174
Adds support for the cargo-generate.toml file, which allows templates to configure which files should be processed, either using a whitelist method (
include
), or a blacklist method (exclude
). When bothinclude
andexclude
are present,include
will be preferred. This mirrors similarinclude
/exclude
behavior incargo
, and uses some of the same code.Include List
[template] include = ["Cargo.toml", "src/lib.rs"] # Only search for and replace template tags in Cargo.toml and src/lib.rs
Exclude List
[template] exclude = ["public/image.js"] # Don't look for template tags in public/image.js
Invalid Configuration
[template] # This is an "invalid" configuration, so cargo-generate takes the "more specific" include option # and will only search for and replace template tags in Cargo.toml. include = ["Cargo.toml"] exclude = ["public/image.js"]
-
-
🤕 Fixes
-
Respect default branch name of template - RotationMatrix, pull/166
The
--branch
flag will now work as intended and set the initial HEAD to the specified branch name. For example, runningcargo generate --git <gh pages template> --branch gh-pages
will set your generated project's default branch togh-pages
.
-
-
🛠️ Maintenance
-
Cleanup of lingering clippy / rustfmt warnings - ashleygwilliams, pull/175
-