I am using plop dependancy to generate module. I want to generate n number of files in one go that used single template.
plop.setGenerator('module', {
description: 'Create a module',
// User input prompts provided as arguments to the template
prompts: [
{
// Raw text input
type: 'input',
// Variable name for this input
name: 'name',
// Prompt to display on command line
message: 'What is your module name?'
}
],
actions: [
{
// Add a new file
type: 'addMany',
// Path for the new file
destination: 'src/Screens/{{pascalCase name}}',
// Handlebars template used to generate content of new file
templateFiles: 'plop-templates/**.js.hbs'
}
]
})
wrap templateFiles in the array.