Repository template for creating a new Web Component, specifically tailored to be part of the Web at Illinois Web Implementation Guidelines Group (WIGG) Toolkit.
Important
Follow the steps in the toolkit-management documentation to contribute a component to the toolkit.
The content that will be in the resulting repository is templated under
the template
directory. The templating is configured
in index.js
, and uses a simple scaffolding tool called
CAZ.
There is a templating GitHub Workflow in this repository that's configured to run only once when the template is used. That workflow executes CAZ to scaffold the repository to the proper contents with the naming determined by the new repository's name.
CAZ accepts input using "prompts", which can be specified in the command line invocation of the tool. The workflow specifies the values to those prompts, and CAZ takes care of the rest.
Finally, the workflow commits the changes to the new repository. This usually takes less than 10 seconds. Once done, the repository is ready to be worked on.
New files can be added to the template
directory, and they
are automatically picked up.
- Substitutions in file names happen with curly braces,
{variable}
- Inside files, lodash templates are used,
which uses
<%= variable %>
as delimiters.
Note
GitHub Workflows cannot be templated, and so must be entirely dynamic
and contained in the main .github/workflows
directory.
If additional variables are needed, they must be added in two locations: