You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@royale.apache.org by Harbs <ha...@gmail.com> on 2017/11/20 09:38:11 UTC

Wrapping for google compiler

I was not able to find the magic incantation to get —output_wrapper in the goog compiler to work.[1]

I tried a couple of variations on this theme:
-js-compiler-option='--output_wrapper (function(){%output%}());'

I gave up and added the anonymous function wrapper using a post-processing script.

Any suggestions on how to make this work?

[1]https://github.com/google/closure-compiler/wiki/FAQ#when-using-advanced-optimizations-closure-compiler-adds-new-variables-to-the-global-scope-how-do-i-make-sure-my-variables-dont-collide-with-other-scripts-on-the-page <https://github.com/google/closure-compiler/wiki/FAQ#when-using-advanced-optimizations-closure-compiler-adds-new-variables-to-the-global-scope-how-do-i-make-sure-my-variables-dont-collide-with-other-scripts-on-the-page>

Re: Wrapping for google compiler

Posted by Harbs <ha...@gmail.com>.
Using asconfig, no error. Using ant I think I got some kind of cryptic not finding console error (or something like that).

I don’t have a lot of interest in investing the time right now (too much other things on my plate), but if someone else wants to figure out how to get it working, it would probably be useful for users...

Harbs

> On Nov 20, 2017, at 7:49 PM, Alex Harui <ah...@adobe.com.INVALID> wrote:
> 
> Did you get an error or something else?
> Did you try other options to see if they work?
> 
> -Alex
> 
> On 11/20/17, 1:38 AM, "Harbs" <ha...@gmail.com> wrote:
> 
>> I was not able to find the magic incantation to get —output_wrapper in
>> the goog compiler to work.[1]
>> 
>> I tried a couple of variations on this theme:
>> -js-compiler-option='--output_wrapper (function(){%output%}());'
>> 
>> I gave up and added the anonymous function wrapper using a
>> post-processing script.
>> 
>> Any suggestions on how to make this work?
>> 
>> [1]https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub
>> .com%2Fgoogle%2Fclosure-compiler%2Fwiki%2FFAQ%23when-using-advanced-optimi
>> zations-closure-compiler-adds-new-variables-to-the-global-scope-how-do-i-m
>> ake-sure-my-variables-dont-collide-with-other-scripts-on-the-page&data=02%
>> 7C01%7C%7C829e19aade6b4897187208d52ffa6f7e%7Cfa7b1b5a7b34438794aed2c178dec
>> ee1%7C0%7C0%7C636467675041585499&sdata=5UrePWNk1KrBdNE%2B8E0uCx4usW8Lrn4xC
>> D4G%2BmaBMaw%3D&reserved=0
>> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c
>> om%2Fgoogle%2Fclosure-compiler%2Fwiki%2FFAQ%23when-using-advanced-optimiza
>> tions-closure-compiler-adds-new-variables-to-the-global-scope-how-do-i-mak
>> e-sure-my-variables-dont-collide-with-other-scripts-on-the-page&data=02%7C
>> 01%7C%7C829e19aade6b4897187208d52ffa6f7e%7Cfa7b1b5a7b34438794aed2c178decee
>> 1%7C0%7C0%7C636467675041585499&sdata=5UrePWNk1KrBdNE%2B8E0uCx4usW8Lrn4xCD4
>> G%2BmaBMaw%3D&reserved=0>
> 


Re: Wrapping for google compiler

Posted by Alex Harui <ah...@adobe.com.INVALID>.
Did you get an error or something else?
Did you try other options to see if they work?

-Alex

On 11/20/17, 1:38 AM, "Harbs" <ha...@gmail.com> wrote:

>I was not able to find the magic incantation to get —output_wrapper in
>the goog compiler to work.[1]
>
>I tried a couple of variations on this theme:
>-js-compiler-option='--output_wrapper (function(){%output%}());'
>
>I gave up and added the anonymous function wrapper using a
>post-processing script.
>
>Any suggestions on how to make this work?
>
>[1]https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub
>.com%2Fgoogle%2Fclosure-compiler%2Fwiki%2FFAQ%23when-using-advanced-optimi
>zations-closure-compiler-adds-new-variables-to-the-global-scope-how-do-i-m
>ake-sure-my-variables-dont-collide-with-other-scripts-on-the-page&data=02%
>7C01%7C%7C829e19aade6b4897187208d52ffa6f7e%7Cfa7b1b5a7b34438794aed2c178dec
>ee1%7C0%7C0%7C636467675041585499&sdata=5UrePWNk1KrBdNE%2B8E0uCx4usW8Lrn4xC
>D4G%2BmaBMaw%3D&reserved=0
><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c
>om%2Fgoogle%2Fclosure-compiler%2Fwiki%2FFAQ%23when-using-advanced-optimiza
>tions-closure-compiler-adds-new-variables-to-the-global-scope-how-do-i-mak
>e-sure-my-variables-dont-collide-with-other-scripts-on-the-page&data=02%7C
>01%7C%7C829e19aade6b4897187208d52ffa6f7e%7Cfa7b1b5a7b34438794aed2c178decee
>1%7C0%7C0%7C636467675041585499&sdata=5UrePWNk1KrBdNE%2B8E0uCx4usW8Lrn4xCD4
>G%2BmaBMaw%3D&reserved=0>