gruntwork-io / boilerplate

A tool for generating files and folders ("boilerplate") from a set of templates
https://www.gruntwork.io
Mozilla Public License 2.0
160 stars 12 forks source link

Add support for interpolation in path names #15

Closed brikis98 closed 7 years ago

brikis98 commented 7 years ago

This PR updates boilerplate so that you can use Go template syntax and boilerplate variables in the names of files and folders.

This is very handy in cases where the paths are determined dynamically. For example, if you were using boilerplate to generate a Java project, your template folder could contain the path com/{{.PackageName}}/MyFactory.java. If you run boilerplate against this template folder and enter "gruntwork" as the PackageName, you'd end up with the file com/gruntwork/MyFactory.java.

brikis98 commented 7 years ago

@josh-padnick Merging so I can do a flurry of boilerplate improvements. Feedback welcome :)