Reputation: 26437
I'm writing a generator that should conditionally run another generator as a hook. Is it supported by yeoman nicely? Or am I only able to spawn OS processes that will run yeoman eventually?
Upvotes: 2
Views: 47
Reputation: 44599
Yeoman does support composability: http://yeoman.io/authoring/composability.html
this.composeWith('some-name', {
args: ['bar'],
options: {testFramework: 'mocha'}
}, {
// that's the path to your npm local version
local: require.resolve('generator-some-name')
});
Upvotes: 2