curist / grunt-bower

grunt task to copy bower installed packages to other folder(s)
MIT License
93 stars 27 forks source link

Add option to *only* include certain packages #58

Open dixhuit opened 8 years ago

dixhuit commented 8 years ago

I have a use case where one of my targets is only interested in 3 of 15 packages. What I could really do with here is an option that works like the opposite of ignorePackages so that I only have to add 3 packages to the Gruntfile as opposed to 12.

kyledmoore commented 7 years ago

I've run into a need for this myself, but in my case only due to attempting to workaround another issue I have, which is I'm at the mercy of some of my project's poorly organized dependencies. Because of some hard coded paths in them, I unfortunately need to both keepExpandedHierachy and not for some files in a single package (and also send them to different destinations).

E.g., I have a package foo that has a **font-awesome/dist/fonts/* that need to go to .tmp/public/vendor/font-awesome**, along w/ some other flattened assets that go to another location (which I do with dest and fonts_dest, which was convenient).

But within foo I also have some assets in fonts and images that I don't want flattened that need to go to .tmp/public/vendor/foo.

Since grunt-bower doesn't appear to support Grunt's files array format, I was unable to represent these separate destinations and properties within a single package, so I was attempting to work around it by creating a separate target to include just the latter portion of the copying for this problematic module and ignore all others, but can't due to the lack of this type of property (and lack of support for a wildcard in ignorePackages - I attempted ignorePackages: ['*']).