使用Yeoman构建ng2组件

时间:2016-05-25 20:15:56

标签: angular yeoman

我想通过引导一个包含模板,.ts文件和.spec.ts文件的新组件来尝试编写一个工具来加速Angular 2的开发。

所以如果我在给定的目录/组件中:

/components
|--/component1
|--/component2
 ...

我想制作一个自定义的Yeoman生成器来获取提示值" newComponent"并构建

/components
|--/component1
|--/component2
|--/newComponent
   |--newComponent.html
   |--newComponent.ts
   |--newComponent.spec.ts
 ...
从模板文件夹

,在每个文件(或其他类似的模板引擎)中将${myNewComponent}替换为newComponent

Yeoman似乎是最好的工具,但是我发现的大多数教程都谈到了使用Yeoman来构建整个项目/网站,这比我想要建立的项目/网站要大得多。

0 个答案:

没有答案
相关问题