Make google Closure Compiler compatible
Original Reporter info from Mantis: ps
-
Reporter name: Pavol S
Original Reporter info from Mantis: ps
- Reporter name: Pavol S
Description:
After using closure compiler (javascript -> javascript) there is no more rtl.run() to run our code.
To fix this we need to add to final code this line (before end):
window['rtl'] = rtl;
//# sourceMappingURL=hello.js.map
and add externs.js file:
/** @Interface /
function ControlsAndConstants() {}
/* @type {number} */
ControlsAndConstants.prototype.run;
After this we can compile and run our JS with:
java -jar closure-compiler.jar --compilation_level SIMPLE --js hello.js --js_output_file hello-compiled.js --externs externs.js
But ADVANCED_OPTIMIZATIONS don't work.
java -jar closure-compiler.jar --compilation_level ADVANCED_OPTIMIZATIONS --js hello.js --js_output_file hello-compiled.js --externs externs.js
Mantis conversion info:
- Mantis ID: 37114
- Build: 1.4.24