cli/new: merge parameters and templateValues

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2025-02-11 11:26:32 +01:00
parent 82107cd9a5
commit 10c419cc0c
8 changed files with 110 additions and 41 deletions
+2 -3
View File
@@ -106,7 +106,7 @@ Your first step in creating your own CLI template is composing your yaml file:
name: custom-plugin
role: frontend-plugin
description: Description of my CLI template # optional
templateValues: # optional
values: # optional
pluginVar: '{{ camelCase pluginId }}Plugin'
```
@@ -115,8 +115,7 @@ The following properties are supported:
- `name` **(required)** - The name of your template, used by the user to select it.
- `role` **(required)** - The role of the template, similar to package role. See [Template Roles](#template-roles) for more details.
- `description` - A description of the type of package that this template produces.
- `parameters` - A map of pre-filled parameters that will be used instead of prompting the user for input.
- `templateValues` - A map of additional values that will be present during templating. The values are themselves templated and can reference other values.
- `values` - A map of additional values that will be present during templating. The values are themselves templated and can reference other values. If the key matches any of the user prompts, such as `pluginId`, the value will be used directly instead of prompting the user.
Once you have your composed template yaml file, [add your new template](#installing-custom-templates) to the CLI config in your root `package.json`: