Project Scaffolder
object ProjectScaffolder
Writes a new project from a ProjectPreset: roto/palette.hex, roto/ramps.json, then roto.json last, so a folder holding roto.json is always a complete project. Writes nothing and overwrites nothing: if any of the three files exists it stops first.
Functions
Link copied to clipboard
fun scaffold(preset: ProjectPreset, config: ProjectConfig, folder: Path, writer: ScaffoldWriter = DirectWriter): Project
Writes preset's palette and ramps and config as a project under folder, like the overload that takes an id. config is the roto.json to write, so it may carry what a preset cannot: custom templates and an afterPublish command. It must keep PRESET_PALETTE_PATH and PRESET_RAMPS_PATH as its palette and ramps.
fun scaffold(preset: ProjectPreset, id: String, folder: Path, writer: ScaffoldWriter = DirectWriter): Project