mirror of https://github.com/espruino/BangleApps
Allow custom modules for apps
parent
6a63a6ea47
commit
4c78076603
12
README.md
12
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
|
## Coding hints
|
||||||
|
|
||||||
- use `g.setFont(.., size)` to multiply the font size, eg ("6x8",3) : "18x24"
|
- use `g.setFont(.., size)` to multiply the font size, eg ("6x8",3) : "18x24"
|
||||||
|
|
2
core
2
core
|
@ -1 +1 @@
|
||||||
Subproject commit 0389671ba6678a12c9f35644ffb96c190bbe0278
|
Subproject commit 8bfdeebf705ced95699dcbbccfa05a99e7d3f4a9
|
|
@ -0,0 +1,9 @@
|
||||||
|
App Modules
|
||||||
|
===========
|
||||||
|
|
||||||
|
These are modules used by apps - you can use them with:
|
||||||
|
|
||||||
|
```
|
||||||
|
var testmodule = require("testmodule");
|
||||||
|
testmodule.test()
|
||||||
|
```
|
|
@ -0,0 +1,3 @@
|
||||||
|
exports.test = function() {
|
||||||
|
console.log("Hello world!");
|
||||||
|
};
|
Loading…
Reference in New Issue