Bower: "ignore" array in bower.json does not remove or ignore anything

Created on 26 Jul 2013  路  6Comments  路  Source: bower/bower

Hi,

I tried the "ignore" option in bower.json with default parameters provided by a "bower init" command and it doesn't remove/ignore files and directory as it should.

Here is my bower.json config:

{
  "name": "bower_test",
  "version": "1.0.0",
  "ignore": [
    "**/.*",
    "node_modules",
    "bower_components",
    "test",
    "tests"
  ],
  "dependencies": {
    "pickadate": "git://github.com/amsul/pickadate.js.git#3.1.3"
  }
}

and after running a "bower install" command, here is the content of my bower_components/pickadate folder:

CHANGELOG.md           Gruntfile.js           README.md              api.htm                demo/                  lib/                   pickadate.jquery.json  time.htm
CONTRIBUTING.md        LICENSE.md             _raw/                  date.htm               index.htm              package.json           tests/                 v2/

and as you can see the pickadate folder still contain "tests" folder that should be ignored thanks to "ignore" array in my bower.json.

Am I missing / misunderstanding / misusing something?

I also tried to add "pickadate/tests", "pickadate/tests/*" and many more combination and none seems to have any impact on the content of my bower's pickadate folder.

Tested with:

node v0.10.15 + bower v1.0.0
and
node v0.8.12 + bower v0.8.5

Most helpful comment

It should work in the supposed way, i.e. ignore the folders or files from the downloaded packages as well....

All 6 comments

You can't ignore on behalf of other packages, it's atomic to your project. Pickadate needs to have the ignore property in its own bower.json.

Ok, thanks I didn't understand that by reading the docs.

Agreed this wasn't obvious to me either!

It should work in the supposed way, i.e. ignore the folders or files from the downloaded packages as well....

wasn't clear to me either, thought exactly the same..

I know this is very old issue. But if the installing package bower.json does not have ignore then bower should check my bower.json file for ignore list.

Was this page helpful?
0 / 5 - 0 ratings