Using two yeoman generators?

2019-06-15 07:37发布

Is it possible to use two generators on one project with yeoman?

For example: I want to use the angular-generator but also want to use another generator, whether it be custom or one of the bootstrap generators.

I know you can add dependencies through bower, but that doesn't add anything to my workflow(e.g. compiling less), does it?

1条回答
贪生不怕死
2楼-- · 2019-06-15 08:17

Yes, it is not only possible, but common. Example: When you use JS-MV* generator in the project (generator-angular for instance) you will probably use generators responsible for other stuff, such as generator-travis-ci, generator-heroku.

Using two generators dedicated to two different JS-MV* frameworks ? NO. It makes no sense.
Yo can do it physically, for instance running generator-ember and generator-angular consequently in the same dir will result in angular's one trying to overwrite files generated previously by generator-ember.

As for the second question changing the workflow is basically changing the Gruntfile. It can be done by generators or by you, manually.

查看更多
登录 后发表回答