diff --git a/README.md b/README.md index 240163f6cf..307323846d 100644 --- a/README.md +++ b/README.md @@ -394,6 +394,18 @@ It should also add `app.json` to `data`, to make sure it is cleaned up when the }, ``` +## Modules + +You can include any of [Espruino's modules](https://www.espruino.com/Modules) as +normal with `require("modulename")`. If you want to develop your own module for your +app(s) then you can do that too. Just add the module into the `modules` folder +then you can use it from your app as normal. + +You won't be able to develop apps using your own modules with the IDE, +so instead we'd recommend you write your module to a Storage File called +`modulename` on Bangle.js. You can then develop your app as normal on Bangle.js +from the IDE. + ## Coding hints - use `g.setFont(.., size)` to multiply the font size, eg ("6x8",3) : "18x24" diff --git a/core b/core index 0389671ba6..8bfdeebf70 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 0389671ba6678a12c9f35644ffb96c190bbe0278 +Subproject commit 8bfdeebf705ced95699dcbbccfa05a99e7d3f4a9 diff --git a/modules/README.md b/modules/README.md new file mode 100644 index 0000000000..6930da2b98 --- /dev/null +++ b/modules/README.md @@ -0,0 +1,9 @@ +App Modules +=========== + +These are modules used by apps - you can use them with: + +``` +var testmodule = require("testmodule"); +testmodule.test() +``` diff --git a/modules/testmodule.js b/modules/testmodule.js new file mode 100644 index 0000000000..c7c93efa34 --- /dev/null +++ b/modules/testmodule.js @@ -0,0 +1,3 @@ +exports.test = function() { + console.log("Hello world!"); +};