Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Filter (include/exclude) files for Bower dependency

Tags:

bower

I am trying to use Bower to manage client side dependencies from a Java/JSP server side application.

It works and I can access client side libraries resolved via "bower install" as described in bower.json.

However, lots of unnecessary files are added to "bower_components" as declared by the dependencies used (tests, docs, examples, etc).

Q: Can I manually specify filters to include/exclude files from each dependency I declare in bower.json?

If this is not possible, it sounds like i need to resolve "bower install"'s output outside the webapp directory and create a separate (maven/grunt) copy task to create the js lib files structure I want - sounds tedious.

like image 519
kctang Avatar asked Mar 08 '14 01:03

kctang


1 Answers

You can use bower-installer which allows you to copy only the files you want by specifying filters to include/exclude files from each dependency in bower.json

like image 158
leszek.hanusz Avatar answered Nov 18 '22 06:11

leszek.hanusz