You are reading a single comment by @luwar and its replies. Click here to read the full conversation.
  • 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

About

Avatar for luwar @luwar started