@profra there are already two distinct modules for the two firmware versions available :(
@MichaelPralow yes, it's a good point. It's been asked before - and might well be worth another post about nice ways to handle this - especially since the modules don't have version numbers at the moment.
For now, as you can type a URL into require, you can actually just pull a module right off GitHub. For instance you could look at the history of something on GitHub, and could then just require a specific version of that file with:
var g = require("https://github.com/espruino/EspruinoDocs/blob/411be7a72bc55b4a51d05f3df5bc8fa80017f3b0/devices/PCD8544.js");
The URL comes from clicking <> by the commit you were interested in.
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.
@profra there are already two distinct modules for the two firmware versions available :(
@MichaelPralow yes, it's a good point. It's been asked before - and might well be worth another post about nice ways to handle this - especially since the modules don't have version numbers at the moment.
For now, as you can type a URL into
require
, you can actually just pull a module right off GitHub. For instance you could look at the history of something on GitHub, and could then just require a specific version of that file with:The URL comes from clicking
<>
by the commit you were interested in.