• Sat 2021.10.30

    Using both the native app and the online WebIDE, even when minification is turned off in settings, an internal module request (as in this instance) is returned minified.

    var wifi = require("Wifi");
    wifi.connect("2WIRE", {password: "3321205"}, function(err){
    



    Results of dump()

    var wifi = {
      "connect": function (a,b,c) {
      var d="";c=c||function(){};void 0!==b.password&&(d=b.password);u(k.CLIEN­T,function(b){if(b)return c(b);f.cmd("AT+CWJAP="+JSON.stringify(a)­+","+JSON.stringify(d)+
    "\r\n",2E4,function m(a){if(0<=["WIFI DISCONNECT","WIFI CONNECTED","WIFI GOT IP","+CWJAP:1"].indexOf(a))return m;"OK"!=a?setTimeout(c,0,"WiFi connect failed: "+(a?a:"Timeout")):setTimeout(c,0,null)}­)})
    },
    



    From

    http://www.espruino.com/Reference#Wifi
    I am able to locate the .c source that is used to generate the wrap container
    https://github.com/espruino/Espruino/blo­b/master/libs/network/jswrap_wifi.c#L207­

    I'm struggling with how the WebIDE is returning minified code, when those options are turned off.

    Is it that the internal modules are minified and included within the .hex .elf build, such that accessing them is returned as such, (in this case is there a location of the minified .js source at GitHub?)

    or,
    Is it that the .js content is run through the Esprima minifier real time when the .connect() (in this instance) function is called,

    or, . . . other??


    Note: I still haven't been able to run successfully an openOCD session to peek into these files.

About

Avatar for Robin @Robin started