-
• #2
I think the answer is provided here: https://www.espruino.com/Modules
-
• #3
Yep, the easiest way is using: https://www.espruino.com/Modules#from-storage
require("Storage").write("answer",` exports.get = function() { return 42; };`) print(require("answer").get()); // prints 42
Rather than using
require("Storage").write
you can use the down-arrow by the Web IDE's Upload button to chooseStorage
and then the module filename you want - then you can upload directly.
How can I write a JavaScript module that can be installed on the Bangle and then required from another app? Is that possible?