← back to roto on ba3a.dev

scaffold

fun scaffold(preset: ProjectPreset, id: String, folder: Path, writer: ScaffoldWriter = DirectWriter): Project

Writes preset as project id under folder and returns it opened. id must follow SafeName. A failed write is a ScaffoldException listing the files already written; a failure to load the result propagates unchanged. Each write goes through writer.


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.