【问题标题】:How can I specify with broccolijs the destination folder of the main bower files?如何使用 broccolijs 指定主要凉亭文件的目标文件夹?
【发布时间】:2015-05-16 11:32:00
【问题描述】:

您好,我正在尝试设置 broccoli,但如果我希望 bower_components 中的文件放在特定文件夹中,让我们说 public/vendor 我该怎么做? 我得到主要的凉亭文件,然后与我的其余文件合并

var findBowerTrees = require('broccoli-bower');
var sourceTrees = [appCss, appJs];
sourceTrees = sourceTrees.concat(findBowerTrees());
module.exports = mergeTrees(sourceTrees, {overwrite: true});

然后我运行 broccoli build public

structure is
--js
--css
--bower_components
in public shoud result
--public
  --js
  --css
  --vendor 

【问题讨论】:

    标签: bower broccolijs


    【解决方案1】:

    您可以在项目的根目录下创建.bowerrc 文件。

    {
      "directory": "public/vendor/"
    }
    

    更多配置参数可以找到here

    注意:要在 Windows 上创建 .bowerrc 文件,请参阅 this SO 问题。

    【讨论】:

      猜你喜欢
      • 2014-02-15
      • 2013-01-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-09-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多