Espruino plugin for Rollup module bundler

Posted on
Page
of 3
First Prev
/ 3
  • @nistvan.86 There is a different philosophy behind the new module. It has been created so that I could separate the JS mangling stuff like module resolution, optimizations and minification from the actual code upload to the boards. We exchanged ideas on this with @Gordon earlier here.

    So the workflow it has been designed in mind with is:

    • use the rollup-plugin-espruino-modules to create the final .js bundle
    • use the EspruinoTools (espruino npm module) to send the bundle to the board

    Or you could use the EspruinoTools (there a config/job variable for that) to run rollup for you with predefined config suitable for using with Espruino. I admit that this needs to get documented better... but you can have a look here.

  • Thank you for explaining. I'm trying to put the pieces together, and Rollup seems to be the way to go.

    I would like to use Typescript on top of allow these, so that's going to twist this a bit further.
    (Interesting that I've found a more complete type definition in this repository for the platform; the @types/espruino definition is missing a bunch of stuff. I don't know where the first one came from, would be good to know. Can't reach the repository owner unfortunately.)

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

Espruino plugin for Rollup module bundler

Posted by Avatar for Joakim @Joakim

Actions