狐狸.fox 2012-12-29 07:55 采纳率: 0%
浏览 224
已采纳

如何更改鲍尔的默认组件文件夹?

I'm making a new project that uses bower from twitter. I created a component.json to maintain all my dependency like jquery. Then I run bower install that installs everything in a folder named components. But I need to install the components in a different folder, e.g. public/components.

I have tried editing my components.json into:

{
  "name": "test",
  "version": "1.0.0",
  "directory": "public/",
  "dependencies": {
    "jquery": "*"
  }
}

or:

{
  "name": "test",
  "version": "1.0.0",
  "componentsDirectory": "public/",
  "dependencies": {
    "jquery": "*"
  }
}

as shown in https://github.com/twitter/bower/pull/94 but it doesn't work.

转载于:https://stackoverflow.com/questions/14079833/how-to-change-bowers-default-components-folder

  • 写回答

7条回答 默认 最新

  • Didn"t forge 2012-12-29 10:00
    关注

    Create a Bower configuration file .bowerrc in the project root (as opposed to your home directory) with the content:

    {
      "directory" : "public/components"
    }
    

    Run bower install again.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(6条)

报告相同问题?

悬赏问题

  • ¥15 抖音咸鱼付款链接转码支付宝
  • ¥15 ubuntu22.04上安装ursim-3.15.8.106339遇到的问题
  • ¥15 求螺旋焊缝的图像处理
  • ¥15 blast算法(相关搜索:数据库)
  • ¥15 请问有人会紧聚焦相关的matlab知识嘛?
  • ¥15 网络通信安全解决方案
  • ¥50 yalmip+Gurobi
  • ¥20 win10修改放大文本以及缩放与布局后蓝屏无法正常进入桌面
  • ¥15 itunes恢复数据最后一步发生错误
  • ¥15 关于#windows#的问题:2024年5月15日的win11更新后资源管理器没有地址栏了顶部的地址栏和文件搜索都消失了