筛选(包括/排除)文件以了解Bower依赖性 [英] Filter (include/exclude) files for Bower dependency
问题描述
我正在尝试使用Bower从Java / JSP服务器端应用程序管理客户端依赖项。
它可以工作,并且我可以访问通过
但是,如所使用的依赖项所声明的那样,许多不必要的文件被添加到 bower_components中(测试,文档,示例,
问:我可以手动指定过滤器来从Bower.json中声明的每个依赖项中包括/排除文件吗?
如果这不可能,听起来我需要在webapp目录之外解析 bower install的输出,并创建一个单独的(maven / grunt)复制任务来创建我想要的js lib文件结构-听起来很乏味。
您可以使用 bower安装程序,可通过指定过滤器以仅包含所需文件来复制/删除每个依赖文件中的文件cy在bower.json
中
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.
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
这篇关于筛选(包括/排除)文件以了解Bower依赖性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!