import { type Feature } from './features.js'; /** What `pnpm create assemora my-project` copies when nobody says otherwise. */ export declare const DEFAULT_TEMPLATE = "bare"; export type FeatureManifest = { /** * Template-relative paths that only exist for this feature. * * A directory counts: naming `app/blocks/hero` removes everything under it. * Paths are written as they appear in the template, so a dotfile is named by the * `_` spelling the template carries it under. */ readonly files: readonly string[]; /** Package names removed from every `package.json` when the answer is no. */ readonly dependencies: readonly string[]; /** * Script names removed from `package.json` when the answer is no. * * A script is not a file and not a dependency, and it is the third thing a feature * can own: a project with no page builder has no bundle, so its `build` script has * nothing to run. A marker comment cannot say so, because JSON carries no comments. */ readonly scripts: readonly string[]; }; export type TemplateManifest = { /** * One line saying what this template is, or nothing when it does not say. * * It is what `--help` prints beside the name, and what a person who has never read * this repository has to decide on. Lower case and no full stop: it is read as the * tail of a line rather than as a sentence of its own. */ readonly description: string | undefined; readonly features: Readonly>; }; /** A template as `--help` lists it: enough to choose one by. */ export type TemplateSummary = { readonly name: string; readonly description: string | undefined; }; export type ResolveTemplateOptions = { /** * Where the walk upwards starts. Defaults to the directory holding this module, * which is the only thing this package knows about its own location. */ readonly from?: string; }; /** * The directory a template's files live in. * * An absolute `name` is taken as a template directory rather than a name, so that * `--template /path/to/my-starter` scaffolds from a starter this package has never * heard of. A name is looked up in the packed copy first and the workspace second, * because after a `prepack` both exist and the packed one is the copy a published * install would be reading. */ export declare const resolveTemplate: (name: string, options?: ResolveTemplateOptions) => Promise; /** * What the template declares is optional, defaulted to "nothing is". * * A template with no `template.json` is a template with no optional parts, which is a * legitimate thing to be — the failure worth having is the opposite one, a manifest * naming a feature this scaffolder does not ask about, because that template expects * a question nobody is answering. */ export declare const readManifest: (directory: string) => Promise; /** * Every template this install can copy, with the line each one says about itself. * * `--help` prints it, and so does the failure for a name that is not one of them — * because "there is no template called blogg" is only half an answer, and the other * half is three words long. * * The same two places `resolveTemplate` searches, in the same order, merged by name so * that whichever a checkout or an install happens to have is listed. It never throws: * a broken manifest in a sibling template is a reason for that template to have no * description here, not a reason `--help` should fail. */ export declare const listTemplates: (options?: ResolveTemplateOptions) => Promise; /** Whether a directory holds anything at all. A missing one holds nothing. */ export declare const isEmptyDirectory: (path: string) => Promise; //# sourceMappingURL=template.d.ts.map