WebIDE minify

Posted on
  • Hi Gordon,

    Proberly i found out and isolated why in WebIDE minify was not working. This code works without minify:

    var ha=function(){
        this.ok={};
        
        self=this;
    };
    

    Google Closure compiler fires an error:

    JSC_CONSTANT_REASSIGNED_VALUE_ERROR: constant self assigned a value more than once at line 4 character 4
        self=this;
    

    The propper code should be:

    var ha=function(){
        this.ok={};
        
        var self=this;
    };
    

    Now minify is working in WebIDE too. We do not see if the minify process had some problem. Is there a way to see the log/output of the built in minifier ?

    Thx

    Sacha

  • Thanks for the update. I've just added an issue for this: https://github.com/espruino/EspruinoWebI­DE/issues/65

    It's just the online Google Closure compiler, so yes - we should be able to see if there are errors.

  • Does the "whitespace only" method also remove comments? I believe I read somewhere that comments slow down the execution speed as well as whitespace.

  • I've just tested this, and yes - it does remove comments as well :)

    And yes, comments do slow execution down - but only when inside a function - so if you put comments before the start of a function it won't make any difference at all.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

WebIDE minify

Posted by Avatar for Sacha @Sacha

Actions