How to include ClockFace.js?

Posted on
  • I see a really nifty-looking module in the BangleApps repo called ClockFace.js (­lob/master/modules/ClockFace.js) that says it can take care of a lot of clockface boilerplate. When I try to require it though, it says it can't find the module.

    How do I go about including this? Should I upload the file to my watch, or is it included in the firmware already somehow like Layout.js (which happens to be along side it in that repo...)? Is this a staging area for modules that are going to be added in a future firmware release, or am I becoming very confused?

    And a related question, how can I list the built-in modules that are available to be required? For example, I don't see Layout.js listed in the files loaded on my watch, yet I can require it.

  • I think I found the answer to one of my questions. The modules directory is for modules developed by people who've published to the BangleApps repo.

    So the next logical question is, how does the app loader know that it needs to load a module? Is there some code that scans for "require" calls, I'm guess? I don't see it get defined explicitly...

  • Best bet is to look at the README file in that modules folder:­lob/master/modules/

    It covers pretty much exactly what you need to know about developing with it :)

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

How to include ClockFace.js?

Posted by Avatar for rocky @rocky