6

Using this generator to scaffold a backbone app gives me insanely big project of 11000 files. Probably because some of the generators are included in the project itself.

Is there an option to keep them generators global? The way Yeoman v0.9.6 was built? Or is it a bad practice?

Enlighten me would ya?

--using yeoman 1 beta 5

4

1 回答 1

4

您可以全局安装生成器:

npm install -g generator-mocha generator-backbone

但是您对 bower 和 npm 的开发依赖项将添加到您的项目本地文件结构中。

  • 节点:<project_root>/node_modules
  • 凉亭:<project_root>/app/bower_components

它们确实占用了大量空间,但至少脚手架 .gitignore 将它们从您的提交中过滤掉 =)

于 2013-05-17T00:58:25.673 回答