I'm using WHITESPACE_ONLY compilation mode; it works just fine provided I manually change the first line of the resulting javascript file to "var COMPILED=true;" instead of "var COMPILED=false;".If I leave it with COMPILED=false, then the following error occurs where it seems to be trying to load a non-existent deps.js file. GET file:///Users/erikn/Documents/Programming/jssimlab/build/sims/experimental/deps.js net::ERR_FILE_NOT_FOUND CurvedTestApp_en.js:12. goog.writeScriptTag_ CurvedTestApp_en.js:12. goog.importScript_ CurvedTestApp_en.js:11. (anonymous function) CurvedTestApp_en.js:14Here is Line 14 of CurvedTestApp_en.js:else return null};goog.findBasePath_();if(!goog.global.CLOSURE_NO_DEPS)goog.importScript_(goog.basePath+"deps.js")}The Bolin "Closure The Definitive Guide" book states about the COMPILED constant: "The value of this variable should never be set directly—it defaults to false and will be redefined at compile time by the Compiler, if appropriate."So, I'm wondering what to do here:1. Create a script as part of my build process to replace "COMPILED=false" with "COMPILED=true" in the compiled javascript. But are there other bad consequences of this?2. Perhaps there is a compiler flag to set the COMPILED constant? (I tried using "--define=COMPILED=true" but this didn't work).
3. I tried adding to the compile command:--compiler_flags="--define=goog.global.CLOSURE_NO_DEPS=true" \but this seems to have no effect.4. ???FYI, I'm using WHITESPACE_ONLY mode because I'm making a command line interface available to my system, so I need unmangled names to survive compilation.I might be able to use SIMPLE_OPTIMIZATIONS if I can figure out how to trick the compiler to not minify some local variables inside of the function where commands are evaluated. For example, in a graphing calculator application I need the local variable "x" to remain "x", so that eval("Math.sin(x)") can succeed. (The user would have typed in "Math.sin(x)" to the command line text field). I can make "x" into a global variable to prevent renaming, but that's not very safe -- I don't really want to add "x" as a global.Is anyone else using WHITESPACE_ONLY compilation mode and actually running the resulting code?Thanks for any ideas on these issues.--ErikN
--
---
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/d/optout.
If you look in base.js the library looks to see if another global value is set to determine if it should try to load sources.
--