使用两个yeoman发电机? [英] Using two yeoman generators?

查看:113
本文介绍了使用两个yeoman发电机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



例如:我想使用角生成器,但也想使用另一个生成器,无论是自定义还是自举生成器之一。



我知道你可以通过bower添加依赖关系,但这不会增加任何东西到我的工作流中(例如编译更少) ,是吗?

解决方案

是的,这不仅可能,而且常见。例如:在项目中使用JS-MV *生成器时(例如 generator-angular ),您可能会使用负责其他内容的生成器,例如 generator-travis-ci generator-heroku



到两个不同的JS-MV *框架?没有。这是没有道理的。

哟可以在物理上做到这一点,例如运行 generator-ember generator-angular 因此在同一个目录中会导致angular的一个尝试覆盖之前由 generator-ember 生成的文件。



至于第二个问题,改变工作流程基本上是改变Gruntfile。它可以由发电机或手动完成。


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?

解决方案

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.

这篇关于使用两个yeoman发电机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆