配置凉亭只安装dist文件夹

配置凉亭只安装dist文件夹

本文介绍了配置凉亭只安装dist文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试学习像bower / grunt / requirejs这样的工具,以加快我网站的开发过程并使我的代码更加模块化/高效。我目前正在遵循。如何让Bower只为我的依赖项安装dist文件夹(在我的component.json文件中设置)而不是整个Git存储库?

I am trying to learn tools such as bower/grunt/requirejs in order to speed up the development process for my website and to make my code more modularized/efficient. I am currently following this tutorial. How does one make Bower only install the dist folder for my dependencies (setup in my component.json file) instead of the entire Git repository?

推荐答案

您要查找的是 bower.json 中的 ignore 属性:

What you're looking for is the ignore property in bower.json: https://github.com/bower/bower.json-spec

当模块通过Bower下载并安装时,模块的开发人员可以使用 ignore 属性来排除文件。

The developer of the module can use the ignore attribute to exclude files when the module is downloaded and installed through Bower.

如果您是开发人员您可以使用 ignore 属性来排除除dist 文件夹以外的所有内容。

If you are the developer of said module, you can use the ignore attribute to exclude everything but the dist folder.

不是模块的开发者,那么你可以做的不多,你会得到模块的开发者认为重要的任何东西。在大多数情况下,这不是问题。

If you're not the developer of the module, then there's not much you can do, you will get whatever the developer of the module has deemed significant. In most cases, this is not a problem.

以下是 ignore 属性的典型配置:

Here's a typical configuration for the ignore attribute:

{
  "ignore": [
    "**/.*",
    "node_modules",
    "bower_components",
    "test",
    "package.json",
    "src"
  ]
}

这篇关于配置凉亭只安装dist文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-07 00:20