Tuesday, July 11, 2017

How to recompile the output of GWT compiler with Closure Compiler?

I already set up the whole toolchain in my project based on maven dependencies:

https://github.com/xemantic/github-users-web

I am using both, GWT and Closure Library. Closure Templates in Incremental DOM mode in particular + jsinterop. Now I would like to combine and minimize all the JavaScript sources in the project, because at the moment it is still loading separately:
  • compiled gwt module
  • compiled closure modules
  • material-components-web.js
I already enabled collapse-all-properties in my GWT module to keep just one permutation and it seems to be working with the Closure Compiler. I can also keep GWT compiler output PRETTY and even enable -XclosureFormattedOutput, but I have no idea:

How to invoke onModuleLoad() method of my GWT module after recompilation,

nor how to specify proper entry point for the closure compiler?

Any hints are highly appreciated. If the -XclosureFormattedOutput flag is there, then most likely someone is using it for the same purpose I am trying to achieve. I believe that Google Inbox is using these techniques. But the Internet seems completely silent on this topic and I couldn't find any examples.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment