-
Notifications
You must be signed in to change notification settings - Fork 294
Add support for a runAction in the plop API #322
Copy link
Copy link
Open
Labels
Description
Currently, if I'm inside of a plop action and want to run a add or addMany, my option is really reduced to making a new generator and running the generator's generator.runActions.
It would be really nice if instead of this:
const {default: generatorDefault} = require('node-plop/lib/generator-runner');
plop.setActionType('setupAzureNPM', async (answers, config, plop) => {
const {runGeneratorActions} = generatorDefault(plop)
await runGeneratorActions({
name: 'Azure NPM Setup',
actions: [
{
type: 'add',
// ...
}
]
})
});We could have something like this:
plop.setActionType('setupAzureNPM', async (answers, config, plop) => {
await plop.runAction({
type: 'add',
// ...
})
});To run a single action from the plop API
Reactions are currently unavailable