@tve The approach you are using is basically what I do as well.
@MaBe
Tested with tinyMQTT and a strip down of SSD1306 for I2C only (SSD1306_I2C).
Using Rollup https://github.com/espruino/EspruinoTools/blob/f8a5ed8bd565070d33154d9196ad9e51f8aa3c33/plugins/minify.js#L52-L65 you'll be able to create bundles that only contain the module exports that were actually used in the application.
My CLI preferred approach is to use the https://github.com/opichals/rollup-plugin-espruino-modules to do all the JS magic and use the espruino cli to only 'upload' the resulting bundle to the board just as @tve mentioned.
@opichals started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
@tve The approach you are using is basically what I do as well.
@MaBe
Using Rollup https://github.com/espruino/EspruinoTools/blob/f8a5ed8bd565070d33154d9196ad9e51f8aa3c33/plugins/minify.js#L52-L65 you'll be able to create bundles that only contain the module exports that were actually used in the application.
My CLI preferred approach is to use the https://github.com/opichals/rollup-plugin-espruino-modules to do all the JS magic and use the espruino cli to only 'upload' the resulting bundle to the board just as @tve mentioned.