angularjs - 向 yeoman Angular-fullstack 项目添加新的依赖项

标签 angularjs node.js yeoman angular-fullstack

我已经开始在 Node js 中开发一个新项目,并使用 yeoman 的 Angular FullStack 生成器生成了该项目。现在我想添加一个新的 Bower 依赖项和一个新的 Node 依赖项。做这个的最好方式是什么?我应该简单地在 Bower.json 和 package.json 中添加依赖项还是应该运行特定命令?

最佳答案

您不需要 yeoman 来为您安装这些依赖项。相反,yeoman 为您提供了一个环境,其中所有内容都设置为使用 bower、npm、grunt 等。您可以像通常使用 npm 或 Bower 一样添加其他依赖项。

凉亭 ( http://bower.io/ ) -

bower install -S <name-of-your-dependancy>

该命令会为您下载代码,并且还会在您的 Bower.json 中添加对其的引用

类似于 Node ( https://www.npmjs.com/ ) -

npm install -S <name-of-your-dependancy>

关于angularjs - 向 yeoman Angular-fullstack 项目添加新的依赖项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29079490/

相关文章:

json - 如何使用 fs.copyTpl 忽略 Yeoman 中的文件

javascript - 将元素从链接函数传递到指令内的 Controller 函数,然后再传递给另一个指令

node.js - Mongoose FindOne 方法始终返回 'null'

javascript - 如何从子表中查找带有外键的父表属性

javascript - 基本 Yeoman Angular Todo 应用程序中的范围问题

javascript - Yeoman Web 应用程序生成器 LiveReload 片段不工作

javascript - Angular 从 MVC JsonResult 获取数据

css - 为什么我的样式对象的某些属性在 ng-style 中被忽略了?

angularjs - 在html5模式下使用ng-route重新加载 Angular 页面不会返回index.html

node.js - 如何让 sequelize getter 与 findAll 一起使用