Skip to content

Function: scaffoldApp()

scaffoldApp(template, target, version, range?): void

Defined in: scaffold.ts:122

Copy the template, restore the dot-paths npm strips from published tarballs (gitignore.gitignore, envrc.envrc), and resolve the tokens across the whole tree — package.json AND source (the app's name feeds scope("__APP_NAME__") in store.ts, the page title, the marker): the app's name comes from the directory, the aiui dependency range from range.

range defaults to what this build should pin to, and exists so a caller can override it: this repo's own pnpm new-demo scaffolds the same template into demos/<slug> with workspace:^, resolving aiui packages from the checkout instead of the registry. One template, both paths.

Parameters

template

string

target

string

version

string

range?

string = ...

Returns

void