A runnable project that represents the structure of a template, but with runnable values.
A templated project, which is the same as #1 but with Mustache variables instead of real values.
A template bundle file, which is packaged with the CLI source, and is inflated at runtime.
Updating a template requires:
Update the runnable project to make sure things work as expected.
Copy the modified files over to the templated project.
Replace all Jinja syntax with escaped Mustache syntax, e.g., {{ -> {{#mustacheCase}}.
Replace all hard-coded template values with Mustache varaibles.
Run mason bundle.
Move the bundle file to its final location in source code.
This process is incredibly tedious. It's easy to miss a Jinja {{ or }} and end up bundling a bad template. It's tedious to repeatedly replace the hard-coded values with Mustache variables for Mason.
Find a way to automate as much of this as possible to avoid mistakes.
Templates in
static_shock_cli
have three pieces.#1
but with Mustache variables instead of real values.Updating a template requires:
{{
->{{#mustacheCase}}
.mason bundle
.This process is incredibly tedious. It's easy to miss a Jinja
{{
or}}
and end up bundling a bad template. It's tedious to repeatedly replace the hard-coded values with Mustache variables for Mason.Find a way to automate as much of this as possible to avoid mistakes.