RC-Paves3-build / plovr

Automatically exported from code.google.com/p/plovr
0 stars 0 forks source link

"define" in config.js is not documented #28

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I couldn't figure out how to use "define". From browsing through the source, it 
looks like

{
  "id": "hello",
  "paths": ".",
  "inputs": "hello.js",
  "mode": "WHITESPACE",
  "define": { 
    "goog.dom.ASSUME_STANDARDS_MODE": true,
    "goog.userAgent.ASSUME_WEBKIT": true
  },
  "level": "VERBOSE"
}

should work, but it seems that it doesn't. It would be nice if if was 
documented how "define" is supposed to be used.

(Thanks for writing the closure book!)

Original issue reported on code.google.com by thakis@chromium.org on 26 Dec 2010 at 12:27

GoogleCodeExporter commented 8 years ago
Hm, I just found http://www.plovr.com/options.html which documents this. EIther 
the options page is new, or it's not linked to from the tutorial / wiki.

It still doesn't seem to work, though – when I search the compiled js file 
generated with the config above for "webkit", I still find the logic that does 
webkit detection. But that's either a problem in the compiler or in my 
understanding of the compiler, since I get this when I manually invoke the 
compiler as well. This bug can be closed.

Original comment by thakis@chromium.org on 26 Dec 2010 at 5:43

GoogleCodeExporter commented 8 years ago
I believe that it was not working for you because you were using the WHITESPACE 
compilation mode, FYI.

Original comment by bolinf...@gmail.com on 2 Jan 2011 at 10:17

GoogleCodeExporter commented 8 years ago
It looks like I created options.html back in October 2010:

http://code.google.com/p/plovr/source/list?path=/src/org/plovr/ConfigOptionDocum
entationGenerator.java&r=52fe2efcc8791ea1e1ff441693b54d2d44f38ec4

Original comment by bolinf...@gmail.com on 2 Jan 2011 at 10:19

GoogleCodeExporter commented 8 years ago
I added a pointer to http://www.plovr.com/options.html on 
http://code.google.com/p/plovr/wiki/GettingStarted.

Original comment by bolinf...@gmail.com on 2 Jan 2011 at 10:26

GoogleCodeExporter commented 8 years ago
Added a note about the SIMPLE/ADVANCED vs WHITESPACE/RAW thing in options.html: 
http://code.google.com/p/plovr/source/detail?r=cdcdeb4ac83c4f0f47c6d780c54983862
895302d

The update will go live when I do the next plovr release, which should be soon.

I think it's now fair to mark this fixed :)

Original comment by bolinf...@gmail.com on 2 Jan 2011 at 10:38