Skip to main content

Settings File

Opts

templates@>=v1.0.21
Type
TemplateOptions;

Template Options. Useful when you want to change the behavior of templates for all users.

tip

Users can override template options by passing options to the command line or .tps/.tpsrc file

settings.json
{
"opts": {
/* ... template options */
}
}
Example

If you want your template to not create a new folder by default then you can add the following to your settings.json file

settings.json
{
"opts": {
"newFolder": true
}
}

Prompts

Type
Prompt[];

Prompts for your template.

settings.json
{
"prompts": [
{
"name": "age",
"message": "How old are you?",
"type": "input",
"tpsType": "data"
}
]
}

see Prompt API for prompt options