github cargo-generate/cargo-generate v0.4.0
🍕0.4.0

latest releases: v0.20.0, v0.19.0, v0.18.5...
4 years ago
  • ✨ 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 both include and exclude are present, include will be preferred. This mirrors similar include/exclude behavior in cargo, 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, running cargo generate --git <gh pages template> --branch gh-pages will set your generated project's default branch to gh-pages.

  • 🛠️ Maintenance

Don't miss a new cargo-generate release

NewReleases is sending notifications on new releases.