Skip to content

Execution

The steps runPreset takes internally are:

  1. Create a queue of Blocks to be run, starting with all defined in the Preset
  2. For each Block in the queue:
    1. Get the Creation from the Block, passing any current known Addons
    2. Store that Block’s Creation
    3. If a runtime mode is specified, additionally generate the approprate Block Creations
    4. If the Block specified new addons for any defined Blocks:
      1. Add those Blocks to the queue of Blocks to re-run
  3. 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:

  1. 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
  2. Add that new repository as the origin remote
  3. 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.