Bower's website describes the ignore
key in bower.json:
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
only works within the scope of packages being installed, ignoring matching patterns.Somewhat longer answer:
Bower will ignore all files matching the patterns specified in the
ignore
property ofbower.json
in installed packages.So, suppose if you ran
bower install someBowerPackage
which had following structure:with a bower.json file having:
then,
index.html
file of thissomeBowerPackage
will not be installed within this package.ignore
is related to the files in your packageignore values are only applied to packages fetched from a bower install endpoint by that component's bower.json file.
ignore values specified in
project-root/bower.json
have no effect on packages fetched as that project's components.The bower.json Spec has been documented in its own github repo since this question was originally asked.
Files matching globs or file values in ignore will not be downloaded from an endpoint as part of the package.