Settings / configuration for the Google Closure compiler? - Play framework 2.0.4

I really like the integration of Google Closure in Play Framework 2.0.X. Now I only want some configuration for the google close compiler (seeing that this is possible from the official Google close page).

Is it possible to add custom / google close settings for the google close compiler in Play 2.0.4.

I know this should be done in Build.scala, but has no idea what to add

Say that I want to configure the SIMPLE compiler instead of ADVANCED, how can I do this?

+4
source share
2 answers

I understand that this is an old question, but maybe this will help someone. I assume you are using Scala.

Here is what I found after some diving code. Adding the following lines to your project settings in project/Build.scala should include some additional features:

  closureCompilerOptions += "advancedOptimizations", closureCompilerOptions += "checkControlStructures", closureCompilerOptions += "checkTypes", closureCompilerOptions += "checkSymbols" 

There is also checkCaja ; they are defined in play.core.jscompile.JavascriptCompiler

+4
source

I do not think that you can greatly influence the configuration of Closure, but you can try what is offered in the official documentation.

But I saw some commits go about Google Closure on branch 2.1 on Github. This may change in a future update to Play.

0
source

Source: https://habr.com/ru/post/1443634/


All Articles