ScaffoldInput
Defined in: types.ts:266
Defines a single interactive input for a scaffold template.
Example
inputs: {
author: { message: "Author name", required: true },
license: { type: "select", message: "License", options: ["MIT", "Apache-2.0", "GPL-3.0"] },
private: { type: "confirm", message: "Private package?", default: false },
port: { type: "number", message: "Dev server port", default: 3000 },
}
Properties
type?
optionaltype?:ScaffoldInputType
Defined in: types.ts:268
The type of prompt. Defaults to "text".
message?
optionalmessage?:string
Defined in: types.ts:270
The prompt message shown to the user. Defaults to the input key name if omitted.
required?
optionalrequired?:boolean
Defined in: types.ts:272
Whether this input must be provided. If true and missing, the user will be prompted interactively.
default?
optionaldefault?:string|number|boolean
Defined in: types.ts:274
Default value. Type depends on the input type: string for text/select, boolean for confirm, number for number.
options?
optionaloptions?: (string| {name:string;value:string; })[]
Defined in: types.ts:276
List of options for type: "select". Each can be a string or { name, value }.