Re: [closure-compiler-discuss] Compiler options and definitions

254 views
Skip to first unread message

Alan Leung

unread,
Feb 19, 2013, 1:56:16 PM2/19/13
to closure-comp...@googlegroups.com
It should be:

--process_closure_primitives




On Tue, Feb 19, 2013 at 9:08 AM, <whity...@gmail.com> wrote:
Hi,

In the base.js I see

---
/**
 * @define {boolean} Overridden to true by the compiler when --closure_pass
 *     or --mark_as_compiled is specified.
 */
var COMPILED = false;

/**
 * @define {boolean} DEBUG is provided as a convenience so that debugging code
 * that should not be included in a production js_binary can be easily stripped
 * by specifying --define goog.DEBUG=false to the JSCompiler. For example, most
 * toString() methods should be declared inside an "if (goog.DEBUG)" conditional
 * because they are generally used for debugging purposes and it is difficult
 * for the JSCompiler to statically determine whether they are used.
 */
goog.DEBUG = true;
---

I didn't find mentioned options --closure_pass, --mark_as_compiled.
I also tried --define='goog.DEBUG=false' --define='COMPILED=true' anyway in the compiled result
I get 

var COMPILED=false;goog.DEBUG=true

How to setup those defines?

Thanx.

--
 
---
You received this message because you are subscribed to the Google Groups "Closure Compiler Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to closure-compiler-d...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

John Lenz

unread,
Feb 20, 2013, 1:57:38 PM2/20/13
to closure-compiler
What compilation mode are you using? If you are using
whitespace-only, it doesn't process defines. It only happens in
simple and advanced mode.

On Wed, Feb 20, 2013 at 10:10 AM, <whity...@gmail.com> wrote:
> I tried it doesn't work
>
> from compiler.jar help:
>
> --process_closure_primitives : Processes built-ins from the
> Closure
> library, such as goog.require(),
> goog.provide(), and
> goog.exportSymbol(
> )
> nothing about defines

Alan Leung

unread,
Feb 20, 2013, 3:37:13 PM2/20/13
to closure-comp...@googlegroups.com
We should probably updated base.js's comment to avoid confusion.

lgan...@gmail.com

unread,
Oct 9, 2013, 9:53:35 AM10/9/13
to closure-comp...@googlegroups.com, whity...@gmail.com
Hi, doesn't this optimization occur automatically in ADVANCED_OPTIMIZATIONS mode? What is this flag for? (--process_closure_primitives)

On Thursday, February 21, 2013 6:48:12 AM UTC-4:30, whity...@gmail.com wrote:
Yes, I'm using whitespace-only.

Unfortunately, simple optimization mode doesn't work for me.

>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>
>>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Closure Compiler Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an

> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--

---
You received this message because you are subscribed to the Google Groups "Closure Compiler Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to closure-compiler-discuss+unsub...@googlegroups.com.

John Lenz

unread,
Oct 9, 2013, 9:57:48 AM10/9/13
to closure-compiler, whity...@gmail.com

Yes it occurs in advanced mode.

To unsubscribe from this group and stop receiving emails from it, send an email to closure-compiler-d...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages