✨ Features
-
Allow the template author to manually specify sub-temlates
Sub-templates may now be specified in the
cargo-generate.toml
file like this:[template] sub_templates = ["sub1", "sub2"]
Doing so also sets the order when
cargo-generate
asks what to expand, while the first option will be the default.If a selected template doesn't have a
cargo-generate.toml
file, but a parent one exists, any configured sub-templates will be ignored.Further implication is that sub-templates no longer needs to have a
cargo-generate.toml
file. -
Test for file existance from rhai scripts
Adds thefile::exists(path: &str)
method for use from hook scripts. -
Conditionals and placeholders are now supported at multiple levels.
If a template sets up more placeholders conditionally, those placeholders are now checked/asked
for and respected for use in further expressions/conditionals. -
Make it possible to convert to
snake_case
andkebab_case
fromRhai
-
Return the path of the generated project from the
generate
function
🤕 Fixes
- fix(#514): boolean value being ignored
- fix lint error
- fix for cargo-generate changes the $CWD
- should fail if --define placeholder value doesn't match placeholder regex
🛠️ Maintenance
- chore(deps): bump anyhow from 1.0.57 to 1.0.58
- chore(deps): bump clap from 3.2.5 to 3.2.6
- chore(deps): bump clap from 3.2.6 to 3.2.8
- chore(deps): bump clap from 3.2.8 to 3.2.12
- chore(deps): bump openssl-src from 111.20.0+1.1.1o to 111.22.0+1.1.1q
- chore(deps): bump rhai from 1.7.0 to 1.8.0
- chore(deps): bump serde from 1.0.137 to 1.0.138
- chore(deps): bump semver from 1.0.10 to 1.0.12
- chore(deps): bump serde from 1.0.138 to 1.0.139
- chore(deps): bump openssl from 0.10.40 to 0.10.41
- chore(deps): bump regex from 1.5.6 to 1.6.0
- refactor: use impl T to improve readability, and change path params to use Path