【问题标题】:NPM - How to install contents of a repo in specified directoryNPM - 如何在指定目录中安装 repo 的内容
【发布时间】:2014-12-24 22:53:56
【问题描述】:

我看到了这个问题,但它并没有完全满足我的需求:How to npm install to a specified directory?

我有一个存储库,其中包含我在项目中使用的所有 sass 样板。我想通过 NPM 或其他方式将它包含在我的项目中,但我不能将它放在 node_modules 目录(或 bower_comonents)中。

有没有办法npm install / bower install 将 repo(或包)的内容放到不是 node_modulesbower_components 的目录中?

【问题讨论】:

    标签: node.js git npm bower


    【解决方案1】:

    对于 Bower,您可以使用 bower 配置文件 (.bowerrc) 中的 directory 属性设置应保存已安装组件的路径(默认为 bower_components):

    {
      "directory": "app/components/"
    }
    

    【讨论】:

      猜你喜欢
      • 2013-01-06
      • 2016-11-09
      • 2013-10-08
      • 2020-10-17
      • 1970-01-01
      • 2011-12-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多