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
Currently, if I'm inside of a
plop actionand want to run aaddoraddMany, my option is really reduced to making a new generator and running the generator'sgenerator.runActions.It would be really nice if instead of this:
We could have something like this:
To run a single action from the plop API