Execution
The steps runPreset
takes internally are:
- Create a queue of Blocks to be run, starting with all defined in the Preset
- For each Block in the queue:
- Get the Creation from the Block, passing any current known Addons
- Store that Block’s Creation
- If a runtime mode is specified, additionally generate the approprate Block Creations
- If the Block specified new addons for any defined Blocks:
- Add those Blocks to the queue of Blocks to re-run
- Merge all Block Creations together
Modes
The create
engine can optionally be told to run in one the following “modes”:
"initialize"
: Indicating the production is being used to create a new repository"migrate"
: Indicating the production is migrating an existing repository
"initialize"
This mode creates a new repository on GitHub.
As the production is run, including writing files on disk and running scripts, the create
engine will:
- Create a new repository on GitHub
- If the Preset’s Base defines a
template
, the repository will include a generated from notice pointing to that template repository
- If the Preset’s Base defines a
- Add that new repository as the
origin
remote - Force-push a single commit with the new repository contents to that origin
"migrate"
This mode migrates an existing repository onto the provided template.
As the production is run, the create
engine will add in additional creations.
This typically includes scripts that delete files from known no-longer-used pieces of tooling.
Made with 💝 in Boston by
Josh Goldberg.