ducin
ducin

Reputation: 26437

run yeoman from within yeoman - is it possible?

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

Answers (1)

Simon Boudrias
Simon Boudrias

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

Related Questions