• I just tried with your code:

    function Test() {
      this.p1 = {x:0, y:80};
      this.p2 = {x:240, y:80};
    }
    Test.prototype.draw = _=> {
      g.clear();
      g.drawLine(0,80,240,80);
      return true;
    };
    var t= new Test();
    if (t.draw()) {
      g.drawLine(0,160,240,160);
    }
    

    And it works fine with minification off on Bangle.js and the emulator.

    The fact that the code in this function:

    Test.prototype.draw = _=> {
    //  g.clear();
    //  g.drawLine(0,80,240,80);
      console.log('line1');
      return true;
    };
    

    Gets all the newlines removed:

    console.log('line1');return true;
    

    Makes me think that likely minification is still turned on.

    The issues with Esprima are something I'm aware of and we're probably going to move to something else completely. However for now, just turn it off (it's the default anyway). Code is executed from flash in Bangle.js and there's also pretokenisation (which basically does the same thing) so it's really unlikely to be needed.

About

Avatar for Gordon @Gordon started