如何使用bower_components中已安装的软件包更新bower.json [英] How to update bower.json with installed packages from bower_components

查看:133
本文介绍了如何使用bower_components中已安装的软件包更新bower.json的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用 bower_components 中已安装的软件包更新 bower.json

How to update bower.json with installed packages from bower_components?

bower init 不会将我所有已安装的软件包添加到 bower.json 中,显然有些缺少

bower init does not add all my installed packages into bower.json, some are obviously missing

较低的列表无法在一个软件包上连接到github。

bower list fails connecting to github on one package.

那么正确的方法是什么?

So whats the correct way of doing this?

推荐答案

使用安装所有新的依赖项- -保存标签。这会将它们自动添加到
您的 bower.json 文件中。

Install all your new dependencies with --save tag. This will add them to your bower.json file automatically.

# e.g. bower install angular --save
bower install <package> --save

如果您错过了添加 save 标记,您可以只运行bower init,它将使用现有bower_components文件夹中的依赖项生成新的 bower.json

If you missed adding save tag you can just run bower init and it will generate a new bower.json using dependencies from existing bower_components folder.

bower init

这篇关于如何使用bower_components中已安装的软件包更新bower.json的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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