You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • If you're trying to get the minimum possible size I'd look at some process that makes one single JS file from your many files - something that has tree-shaking so can remove unused code.

    The module implementation inside Espruino is quite efficient, assuming you just use it with exports and without the general-purpose function(){} wrappers that get added for some libraries.

    However at the end of the day, all the names of exported functions have to stay the same - so some tool that knows enough about the whole project to rename all functions will be better. It just depends if you care about debugging or not.

    For production, it depends on the parts you're using and whether you expect their firmware to be up to date. For STM32-based Espruino boards I'd suggest getting a board as you want it, then using stm32loader.py to load a firmware image from the board, and to then write it to all your production boards.

    That way you update the Espruino firmware and your software all at once.

About

Avatar for Gordon @Gordon started