Filter (include/exclude) files for Bower dependency

柔情痞子 提交于 2019-12-05 17:39:03

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/22263820/filter-include-exclude-files-for-bower-dependency

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!