Note that there are some explanatory texts on larger screens.

plurals
  1. POhelp with google closure compiler basics
    text
    copied!<p>I'm having trouble understanding the basic flow of using the google closure compiler API service. I'll just fire away with some questions:</p> <ol> <li>Am I supposed to include closure's base.js in the list of files I send to be compiled?</li> <li>deps.js is too large to send. Am I supposed to include it myself, or will the compiler service use its own copy?</li> <li><p>It was my understanding that one of the features of the compiler is that it parses the "require" statements, and includes the necessary code in the output. For example, if I go to the <a href="http://closure-compiler.appspot.com/home" rel="nofollow">online UI tool</a> they provide and type the following into the input box:</p> <pre><code>goog.require("goog.dom"); goog.dom.getElement("test"); </code></pre></li> </ol> <p>and press "compile", I would expect to get back just enough of the google closure code to execute this snippet. Instead, I just get the same thing back (minus whitespace). What am I not understanding?</p> <p>And finally, google's compiler service has a 200k size restriction on the files you send in. I'm using a PHP package called Minify, that lets you send a list of files, which are sent through the service one at a time, and presumably this is how google expects you to deal with the 200k limit. The compiler is supposed to be checking, say, that none of your private variables are being accessed as public anywhere, which seems to imply that it would have to have knowledge of all the files in the list to make sure that a class defined in file A is not being violated in file B. Is this the case? Does the service somehow remember each file as its parsed, keep it in memory, and cross-check everything? Or is my understanding yet flawed?</p> <p>Thanks, guys! </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload