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 System contexts and:
rootDirectory: string
(default:'.'
): The root directory to write files to
runBlock
Given a Block, executes a Creation output by running its produce()
.
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()
.
For example, given a Preset containing the previous Block that creates a README.md
, this would write that file to system: