stephenplusplus/grunt-wiredep

Support Bower's new ignoredDependencies array

Closed this issue · 8 comments

Hi.

It appears that from version 1.4. Bower will support a new array, ignoredDependencies. Typical use case is to have, say, Backbone with Lodash instead of underscore - you can add underscore to the ignore list and it won't be installed.
bower/bower#1394

I would like to extend this concept to grunt-wiredep. What are your thoughts, and is someone else already doing it?

Thanks

wiredep has exclude, which is an array of values that if an injection path matches, will be ignored:

wiredep({ exclude: ["underscore"] })

When wiredep goes to inject bower_components/underscore/underscore.js, it would skip it, since the value given to exclude was found in the path.

I'll leave this issue open as a reminder ignoredDependencies may be coming in a future Bower. Generally, Bower doesn't implement new features too quickly, so we will have time to sort out the details :)

Bower has included this in version 1.6.2.
Despite the fact that there is still an issue with this feature, even if it works correctly, it isn't compatible with wiredep.
As far as I understand it, wiredep's exclude just ignores the configured values when injecting them in the configured files, but it still checks if a dependency is present at all.
So when a dependency is ignored by the new bower feature, wiredep shows an error because this ignored dependency is not installed.

Hi. I have stopped using bower months ago and am not looking back.
Thanks for wiredep, but I will close this issue now.

Why are you closing this?
It's fine if you don't use bower anymore, but this is a valid issue for anybody who still does.
So please consider reopening it.

I'm also interested in this feature because i want to provide angularjs for my own and grunt-wiredep always complains:

 Error: angular is not installed

I'm using the 'ignoredDependencies' feature (bower/bower#1394) in my .bowerrc:

{
  "directory": "src/main/webapp/bower_components",
  "ignoredDependencies": ["angular"]
}

thnx

Vnthf commented

I have the same issue. please support this

this should be opened on wiredep (and I think it already is)

@eddiemonge give me link-issue please