View Issue Details

IDProjectCategoryView StatusLast Update
0037114pas2jstranspilerpublic2020-05-19 15:50
ReporterPavol S Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Summary0037114: Make google Closure Compiler compatible
DescriptionAfter 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
Tagsclosurecompiler, optimization
Fixed in Revision
Attached Files

Activities

Pavol S

2020-05-19 15:50

reporter   ~0122934

info about code generation required for ADVANCED_OPTIMIZATIONS:

https://developers.google.com/closure/compiler/docs/api-tutorial3

Issue History

Date Modified Username Field Change
2020-05-19 15:43 Pavol S New Issue
2020-05-19 15:44 Pavol S Tag Attached: optimization
2020-05-19 15:44 Pavol S Tag Attached: closurecompiler
2020-05-19 15:50 Pavol S Note Added: 0122934