My markup:
<script src="http://somecdn.com/jquery-1.4.2.min.js"></script>
<script src="/js/mycode.closure_compiled.js"></script>
My code:
goog.provide("mycode");
mycode.foo = function () {
jQuery("#ajaxSpinner").show();
jQuery.get("/ajax/foo", function () { /* ... */ });
}
I want to compile my code with advanced optimizations using the Google Closure Compiler.
How do I achieve the following?
- The compiler should not rename "jQuery" and "jQuery.get".
- The compiler should not throw Errors or Warnings (eg. "unknown type 'jQuery'").