• About minimizing... since my module was simple and small, I selected Closure (online) Simple Minification , placed module into sandbox modules folder, made a one-liner in edit pane that requires the module, uploaded that one-liner to th3 board, 'pullled it back' in the console pane using arrow up.

    What you can see is the string that the Web IDE sent to the Espruino, something like this: Modules.addCached("MyModule","var F=function(x){return x*x+\" square\";}" see Modules.addChached(...); I copied the string, trimmed it, and replaced the \" with plain "...

    I'm sure there are smarter and more elegant ways to do that... but it did what it had to do without figuring out a single command.

    It would be nice the Web IDE had a setting that would write the minimized code back.... (I would not mind an extra user prompt for the times it writes back. With leaving a timestamp with thee minified file, an auto-detect for change... (if the Web IDE can read the file without user interaction).

About

Avatar for allObjects @allObjects started