我尝试了GWT 2.7并且想知道-XjsInteropMode JS和-XjsInteropMode CLOSURE编译器标志之间有什么区别?
答案 0 :(得分:7)
-XjsInteropMode JS将输出标准的反混淆javascript访问器(方法名称直接匹配,bean getter / setters映射到简单的属性访问)。我假设使用CLOSURE选项将Closure类型注释添加到输出中以确保Gwt和Closure之间的双向类型安全......但Goktug已回复G +,说:
-XjsInteropMode CLOSURE was used to generate export code in a way
that was assuming closure goog.provide(...) statements exists in
the beginning of js (potentially produced and prepended by a linker).
It was not useful for general public.
I'm using past tense because the option is now removed from the trunk.
Anways,如果你对与Gwt关闭感兴趣,那么视频还没有上映,但Ray Cromwell关于Google Inbox的讨论提到他们如何支持高度优化,快速编译Gwt - > Closure Friendly JS - >缩小混淆的JS。
视频启动时,请在此处查看: http://gwtcreate.com/videos/index.html 在此之前,这里有幻灯片: https://drive.google.com/a/wetheinter.net/file/d/0B3ktS-w9vr8IS2ZwQkw3WVRVeXc/view
最后,Ray特别谈到了Js Interop: https://docs.google.com/a/wetheinter.net/file/d/0ByS1wxINeBWjeGYxbkJpamxFZ28/edit
请注意,还有一个待处理的视频视频。这非常好。您应该在上传时看到它们。