📖
Genèse
  • Quick Start
  • Templates
    • Template
    • Injection
    • Conditional rendering
    • Frontmatter
  • Generators
    • Generator
    • Prompt
Powered by GitBook
On this page
  • Input
  • Confirmation
  • Choice
  • Choice (multiple)
  1. Generators

Prompt

The prompt.yaml file contains some definitions for our necessary variables in templates.

prompt.yaml
- type: input
  name: age
  message: What's your age?
  initial: 18

Here is a list of the available questions:

Input

- type: input
  name: age
  message: What's your age?
  initial: null

Confirmation

- type: confirmation
  name: is_null
  message: Should the value be null?
  initial: false

Choice

- type: choice
  name: color
  message: Please select your favorite color (defaults to red)
  choices: [ 'red', 'blue', 'yellow' ]
  initial: 0

Choice (multiple)

- type: choice
  name: colors
  message: Please select your favorite color (defaults to red)
  choices: [ 'red', 'blue', 'yellow' ]
  initial: '0,1'
  multiple: true

PreviousGenerator

Last updated 3 years ago