You are reading a single comment by @allObjects and its replies. Click here to read the full conversation.
  • @Gordon, that's excellent...

    in other words, exports is provided in the context of `.addCached() when executing the passed in (anonymous) function for the 'moduleSource' parameter... (I finally understand what a recent release mentioned with 'ability to store or storing a module as a function' - is it that or is that at least related to it?).

    Therefore, instead of using concatenated or multi-line string to pass in the module source, the module 'source' is wrapped with an (anonymous) function that sets or populates the exports object.

    I will use this function approach to replace the string approach in mentioned conversation about Module Development. It fulfills *exactly* the same requirements I have with a better support. Syntax highlighting and (Espruino extended,) specific code completion are just two - important - parts of it, all provided by the Espruino IDE.

    ...all with enabling all sorts of makers in mind. (@Gordon, is that - or at least a major port of it - not what ignited the Espruino-Journey in the first place?)

    PS: it's about time for me to really really dig into the Espruino source code... or not... I'm confused... ;-)


Avatar for allObjects @allObjects started