IBM Worklight - 如何修补Cordova? [英] IBM Worklight - How do I patch Cordova?
问题描述
在添加对Windows 8环境的支持时,我遇到了Cordova错误。当我获取目录列表时,文件夹将以文件形式报告: https://issues.apache .org / jira / browse / CB-5774
While adding support for the Windows 8 environment, I've hit a Cordova bug. The folders are being reported as files when I get the directory listing: https://issues.apache.org/jira/browse/CB-5774
我想在我的项目中应用补丁,因为我知道您无法在Worklight中升级Cordova版本项目。
I want to apply the patch in my project as I understand you cannot upgrade the Cordova version in a Worklight project.
我使用Worklight 6.1.0。
I am using Worklight 6.1.0.
推荐答案
我想出了一个补丁的方式(JavaScript补丁)..我相信这不是一个永久解决方案 - 但一个adhoc一直到修补Cordova是可用的新版本的Worklight。
I figured out a way to patch (JavaScript patch).. I am sure this is not a permnant solution - but a adhoc one till the patched Cordova is available with a new version of Worklight.
在我的例子中,错误在 FileProxy.js
。我创建了一个目录结构来镜像问题文件的位置,并在那里添加了修补文件( www\worklight\plugins\org.apache.cordova.file\src\windows8\\ \\ fileProxy.js
)。
In my case the bug was in FileProxy.js
. I created a directory structure to mirror the location of the problem file and added the patched file there.(www\worklight\plugins\org.apache.cordova.file\src\windows8\FileProxy.js
).
在构建时,cordova文件先复制,然后 www
内容在...之后复制,所以我的修补文件覆盖了一个bug。
At build time the cordova files are copied first and then www
contents are copied after... so my patched file overwrote the one with the bug.
我确定这不是Worklight支持的方式 - 但我不再被阻止。
I'm sure this is not a supported way by Worklight - but I am no longer blocked.
这篇关于IBM Worklight - 如何修补Cordova?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!