Bower is a package manager for the web. It offers a generic, unopinionated solution to the problem of front-end package management, while exposing the package dependency model via an API that can be consumed by a more opinionated build stack. There are no system wide dependencies, no dependencies are shared between different apps, and the dependency tree is flat.简单的来说就是:
这里依赖于node以及Npm,所以我们需要安装nodejs,具体可以参见nodejs官网,不过如果是同Mac os或者是Ubuntu的话,可以用类似于
brew install npm
再安装bower
npm install -g bower
创建一个简单的配置文件.bowerrc用于配置Bower安装路径
{
"directory": "public/"
}
安装
bower install angularjs
$ bower install angularjs
bower cached git://github.com/angular/angularjs.org.git#58ef7908d9
bower validate 58ef7908d9 against git://github.com/angular/angularjs.org.git#*
如果要安装指定版本就是
bower install <name>=<package>#<version>
例如
bower install jquery#1.4
围观我的Github Idea墙, 也许,你会遇到心仪的项目