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

v0.0.1 of boilerplate #1

Closed brikis98 closed 8 years ago

brikis98 commented 8 years ago

This is v0.0.1 of our new project generator, which I’ve decided to call “boilerplate” instead of “gruntwork-generator”.

Functionality implemented so far:

  1. Use a yaml file to define variables (and perhaps other configs in the future). JSON is too syntax heavy and doesn’t allow comments. HCL doesn’t support objects nested in lists. YAML seems like a well-known standard that keeps things clean & simple.
  2. Reading the values for variables from command line options, var files, and by prompting the user.
  3. Generating a project by copying all files from the source dir to the destination dir, passing text files through the Go template engine to allow variables to be filled in and other dynamic behavior.
  4. Support for custom template helpers. One is implemented now, called snippet, which lets you embed snippets of other files in the current file. Very handy for documentation.
  5. Tests.
  6. Examples.
  7. Docs.

Please see the README in the _docs folder for details.

Remaining work:

  1. Automatically build the binaries and push them to GitHub for each release.
  2. Auto generate the root README.md file from the _docs/README.md file on release.
  3. Add lots more examples.
brikis98 commented 8 years ago

@josh-padnick With the exception of the items listed under "Remaining work", this is ready for review.

josh-padnick commented 8 years ago

I'm excited to review this! In the interest of prioritizing client work, I'm going to defer reviewing this until later today or early tomorrow.

brikis98 commented 8 years ago

Tomorrow is just fine. I unfortunately did not get this done quite on time to use it with Instrumental, so I'm doing their work by hand. However, once this is reviewed and merged, and I have some time, I'll start creating some templatized modules in usage-patterns.

brikis98 commented 8 years ago

@josh-padnick I'm going to merge this in and start using it on the usage-patterns repo, updating with bug fixes and new features as necessary.

josh-padnick commented 7 years ago

First, my apologies for the delay in reviewing this excellent code.

I must say, this is a really great tool, and the code quality and test coverage is excellent here. I had mostly questions and curiosities but no major challenges of any kind. So, officially LGTM!