“忽略”在Bower的bower.json中? [英] "ignore" in Bower's bower.json?

查看:129
本文介绍了“忽略”在Bower的bower.json中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

鲍尔的网站描述了bower.json中的 ignore 键:

Bower's website describes the ignore key in bower.json:


ignore [array]:生产中不需要的路径数组,您在安装软件包时希望Bower忽略这些路径。

ignore [array]: An array of paths not needed in production that you want Bower to ignore when installing your package.

这是否意味着它忽略了已安装组件或包中的路径?或者是其他东西?对此我感到困惑。

Does this mean that it's ignoring paths in installed components, or in your package? Or something else? I was confused by this.

推荐答案

TL; DR:



ignore 仅在安装的软件包范围内起作用,而忽略匹配的模式。

TL;DR:

ignore only works within the scope of packages being installed, ignoring matching patterns.

鲍尔将忽略与 ignore 属性中指定的模式匹配的所有文件。 bower.json 在已安装的软件包中。

Bower will ignore all files matching the patterns specified in the ignore property of bower.json in installed packages.

因此,假设您运行了 bower,请安装someBowerPackage 具有以下结构:

So, suppose if you ran bower install someBowerPackage which had following structure:

someBowerPackage
|- css/
|- js/
|- index.html
|- bower.json

的bower.json文件具有:

with a bower.json file having:

{
  ...
  "ignore": [ "index.html" ]
}

然后, index.html此 someBowerPackage 文件不会安装在此软件包中。

then, index.html file of this someBowerPackage will not be installed within this package.

这篇关于“忽略”在Bower的bower.json中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆