简体   繁体   English

Bower:如何修补软件包或应用替代?

[英]Bower: How to patch a package or apply overrides?

Which is the best way to override or apply patches on a package, that is added to my project by using bower? 哪种方法可以覆盖或应用程序包中通过使用Bower添加到我的项目中的补丁程序?

In my Sass folder I have a vendor_overrides folder, I'm ok with that, but how to handle javascripts? 在我的Sass文件夹中,我有一个vendor_overrides文件夹,我可以接受,但是如何处理JavaScript?

Fork the project and then install that with bower? 分叉该项目,然后安装凉亭?

I couldn't find anyway to do this with bower. 无论如何,我找不到凉亭做这件事。

Like you suggested. 就像你建议的那样。 Fork and hosting your own is an option. 您可以选择使用叉子和自己代管。 It is mentioned in What's a good method for monkey patching Bower packages in Angular? 在Angular中用猴子修补Bower软件包的好方法中提到了什么?

Another method, Which I ended up going with since I was just making a small change was to create a patch file using diff original_file modified_file > patch_file and then patch that file using patch -N file < patch_file . 自从我进行了少量更改后,我最终使用的另一种方法是使用diff original_file modified_file > patch_file创建一个补丁文件,然后使用patch -N file < patch_file对该文件进行patch -N file < patch_file

Then I just make sure that in the tool chain for setting up/ building the project that that patch call occurs after bower install 然后,我只是要确保在用于建立/构建项目的工具链中, bower install后便会发生补丁调用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM