gruntwork-io / boilerplate

A tool for generating files and folders ("boilerplate") from a set of templates
https://www.gruntwork.io
183 stars 16 forks source link

Add ability to use Go template syntax and variables within a template #21

Closed brikis98 closed 7 years ago

brikis98 commented 8 years ago

Example:

variables:
  - name: BasePath

dependencies:
  - name: Foo
    template-folder: {{.BasePath}}/templates
    output-folder: {{.BasePath}}/output

Note how the template-folder and output-folder params of the Foo dependency use {{.BasePath}} to fill in the value entered for the BasePath variable.

josh-padnick commented 7 years ago

Just ran into this use case myself, so +1.

brikis98 commented 7 years ago

Added in https://github.com/gruntwork-io/boilerplate/pull/33