BangleApps/modules
Gordon Williams 595e4a71ea Fix Layout regression after 9c4cc9d585
fixes https://github.com/espruino/BangleApps/issues/3623
2024-10-28 16:50:44 +00:00
..
.eslintrc.js Allow suncalc to be exported via `globalThis` 2024-03-16 11:30:01 +01:00
ClockFace.js ClockFace: remove clockHasWidgets hack 2023-01-07 17:52:31 +01:00
ClockFace.md ClockFace: always loadWidgets, option to hide them using widget_utils 2023-01-07 16:50:30 +01:00
ClockFace_menu.js Fix lint errors 2024-03-14 11:18:18 +01:00
Layout.js Fix Layout regression after 9c4cc9d585 2024-10-28 16:50:44 +00:00
Layout.md readme 2024-05-20 11:36:15 +01:00
Layout.min.js Fix Layout regression after 9c4cc9d585 2024-10-28 16:50:44 +00:00
README.md update docs to put the best solution at the top 2022-12-06 09:41:54 +00:00
Slider.js Slider: always emit final event 2024-04-21 19:35:40 +01:00
Slider.md Slider: update docs 2024-04-22 08:18:49 +01:00
ble_advert.js ble_advert: generate js 2024-05-28 22:44:36 +01:00
ble_advert.ts ble_advert: disable `remove()` - unused 2024-05-28 22:44:36 +01:00
buzz.js Fix buzz.js - whenever called this used to keep firing an interval every 100ms, and they would build up! 2023-06-08 19:26:12 +01:00
buzz_menu.js [buzz] Add support for ',' and ';' 2022-06-03 17:29:57 +02:00
dane_arwes.js docs on modules 2022-01-28 09:46:19 +00:00
dane_arwes.min.js Add pre minified dane_arwes module while automatic minification is broken 2020-12-17 12:01:44 +01:00
date_utils.js Fix lint errors 2024-03-14 11:18:18 +01:00
exstats.js exstats: permit "notify" handlers to change `.next` 2024-10-15 08:23:26 +01:00
graphics_utils.js graphics_utils - Use correct parameter variable 2023-01-22 10:06:32 +01:00
more_pickers.js more_pickers: draw sections independently for faster execution 2024-08-31 20:31:07 +02:00
more_pickers.md add new module: more_pickers 2024-06-17 12:18:42 +02:00
power_usage.js Nerf power-type check for firmware issue (espruino/Espruino#2529) 2024-07-11 21:21:34 +01:00
power_usage.ts power_usage: work with new types 2024-07-11 22:41:42 +01:00
suncalc.js Allow suncalc to be exported via `globalThis` 2024-03-16 11:30:01 +01:00
testmodule.js Allow custom modules for apps 2020-12-09 13:43:29 +00:00
time_utils.js tidying up time_utils to make it faster and pretokenise better 2024-10-25 09:36:23 +01:00
wear_detect.js optimize for precision over accuracy 2022-09-09 17:54:08 -07:00
widget_utils.js Fix widget_utils breakage which caused the widget bar used with swipeOn to literally never be hidden. Was 2024-08-05 10:46:43 +01:00

README.md

App Modules

These are modules used by apps - you can use them from a Bangle.js app with:

var testmodule = require("testmodule");
testmodule.test()

Development

When apps that use these modules are uploaded via the app loader, the module is automatically included in the app's source. However when developing via the IDE the module won't get pulled in by default so you may see the error "Module <module_name> not found" in the IDE when sending code to the Bangle.

To fix this you have three options:

Change the Web IDE search path to include Bangle.js modules

This is nice and easy (and the results are the same as if the app was uploaded via the app loader), however you cannot then make/test changes to the module.

  • In the IDE, Click the Settings icon in the top right
  • Click Communications and scroll down to Module URL
  • Now change the module URL from the default of https://www.espruino.com/modules to https://banglejs.com/apps/modules|https://www.espruino.com/modules

The next time you upload your app, the module will automatically be included.

Note: You can optionally use https://raw.githubusercontent.com/espruino/BangleApps/master/modules|https://www.espruino.com/modules as the module URL to pull in modules direct from the development app loader (which could be slightly newer than the ones on https://banglejs.com/apps)

Host your own App Loader and upload from that

This is reasonably easy to set up, but it's more difficult to make changes and upload:

  • Follow the steps here to set up your own App Loader: https://www.espruino.com/Bangle.js+App+Loader
  • Make changes to that repository
  • Refresh and upload your app from the app loader (you can have the IDE connected at the same time so you can see any error messages)

Upload the module to the Bangle's internal storage

This allows you to develop both the app and module very quickly, but the app is uploaded in a slightly different way to what you'd get when you use the App Loader or the method below:

  • Load the module's source file in the Web IDE
  • Click the down-arrow below the upload button, then Storage
  • Click New File, type your_module_name as the name (with no .js extension), click Ok
  • Now Click the Upload icon.

You can now upload the app direct from the IDE. You can even leave a second Web IDE window open (one for the app, one for the module) to allow you to change the module.