How to write a custom prompt? #1111
-
P.S. npm and yarn define workspaces in package.json as shown in the example below: "workspaces": [
"apps/*",
"packages/*"
] |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey, we do not have documentation on how to achieve this unfortunately... But there's a ton of examples custom prompts listed in the README, you could read their code to see how it works. Aside from that, I think the new (beta) interface of Inquirer core is much much easier to use to write custom prompts. Refers to the prompts in our own monorepo to see the interface in use. The new checkbox prompt might be a good place to start to see a complex one - or input prompt for a simpler one, etc. |
Beta Was this translation helpful? Give feedback.
Hey, we do not have documentation on how to achieve this unfortunately... But there's a ton of examples custom prompts listed in the README, you could read their code to see how it works.
Aside from that, I think the new (beta) interface of Inquirer core is much much easier to use to write custom prompts. Refers to the prompts in our own monorepo to see the interface in use. The new checkbox prompt might be a good place to start to see a complex one - or input prompt for a simpler one, etc.