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.CLIENT,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)})})
},
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.
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.
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.Results of dump()
From
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??