Runner APIs
Runner APIs can be used to execute and apply Creations on disk:
Each runner API takes in up to two arguments:
- The construct to be run
- An object with properties from the construct’s context as well as:
directory: string
(default:'.'
): The root directory to write files tomode
(optional): What runtime mode to run inoptions
(optional): The construct’s Options values- Any properties from System contexts (optional)
runBlock
Given a Block, executes a Creation output by running its produce()
.
See Producers > runBlock
for the arguments runBlock
allows.
For example, given a Block that creates a README.md
, this would write that file to system:
runPreset
Given a Preset, executes a Creation output by running each of its Blocks produce()
.
See Producers > produceBlock
for the arguments runPreset
allows.
For example, given a Preset containing the previous Block that creates a README.md
, this would write that file to system:
Made with 💝 in Boston by
Josh Goldberg.