In general: If you want to minify a JavaScript program with Google Closure Compiler in "Advanced Minification" mode then you need an *.externs file for every library which is not part of the minification step. The builtin functions are not part of the minification. So an extern file is required. Advanced minification is useless without an externs file.
I've attached an espruino.externs file which I use for module minification. But it must be built into the WebIDE code to be sent to the minification service.
The same simple logic must be built into the WebIDE. Then advanced minification would work there too. But I don't know the source code of the WebIDE. Sorry.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
In general: If you want to minify a JavaScript program with Google Closure Compiler in "Advanced Minification" mode then you need an *.externs file for every library which is not part of the minification step. The builtin functions are not part of the minification. So an extern file is required. Advanced minification is useless without an externs file.
I've attached an espruino.externs file which I use for module minification. But it must be built into the WebIDE code to be sent to the minification service.
I did it for module minification some time ago:
https://github.com/espruino/EspruinoDocs/blob/master/bin/minify.js#L18
https://github.com/espruino/EspruinoDocs/blob/master/bin/minify.js#L41
The same simple logic must be built into the WebIDE. Then advanced minification would work there too. But I don't know the source code of the WebIDE. Sorry.
1 Attachment