Open tobiashochguertel opened 5 months ago
have you tried inquirer tree prompt?
inquirer tree prompt helps, but the main question is how to call another generator from inside of a generator?
plop.setGenerator('menu', {
description: 'Languages / Frameworks',
prompts: [
{
type: 'tree',
name: 'selection',
message: 'What would you like to do?',
validate: (value) => !!value,
tree: createMenu(frameworks)
}
],
actions: async function (response) {
console.log(JSON.stringify(response));
return await plop.load(`./${response.selection}/generator.js`);
}
});
Is it possible to build a structured menu as following
When I select
React
in the first level, that I get then a list of the different plopjs-generators
which are sorted under the React menu point?