At the moment there's nothing built in, and adding the module loading (despite it still being in the docs) is actually very low priority.
The problem (much like on desktop) is that the require call is synchronous but the actual HTTP GET is async, so it would be a bit tricky to combine them. And while it might be possible to hack around it on normal Espruino boards, on ESP8266 I think it would likely fail completely (because it really dislikes functions that take a long time to execute).
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.
At the moment there's nothing built in, and adding the module loading (despite it still being in the docs) is actually very low priority.
The problem (much like on desktop) is that the
require
call is synchronous but the actual HTTP GET is async, so it would be a bit tricky to combine them. And while it might be possible to hack around it on normal Espruino boards, on ESP8266 I think it would likely fail completely (because it really dislikes functions that take a long time to execute).However nothing stops you from writing your own async
loadModule
function that you can call yourself (which will work on all platforms) - it just can't be automatic. All it has to do is request the JS file from http://www.espruino.com/modules/ and then call http://www.espruino.com/Reference#l_ModuÂles_addCached with it as a string.