指定bower的安装目录

在项目的根下创建一个名为.bowerrc 的文件

{
  "directory" : "public/libs"    //bower中的插件 安装目录
}

运行bower install

bower init 生成json         ---(npm init 生成package.json)

npm install bower -g
bower install jquery
npm install jQuery --save //--save会保存的到package.json中

  



原文地址:https://www.cnblogs.com/labihua/p/4505970.html