This uses rollup
, babel
and fast-async
to show how async/await can be used with Espruino
.
Verified with Puck.js, Espruino Pico 1.3, ESP32, Espruino v1.96
npm install
# Bundle the source code and upload it to the board
npm start --production
Some other commands:
# Bundle in development mode
npm run build
# Bundle in production mode (minified)
npm run build --production
# Open device console
npm run console
Note: this currently uses a Makefile, so can have trouble uploading to the board on Windows. This can be easily tweaked.
- async/await support
- ES5/ES6 wishlist
- Maximum number of scopes exceeded
-
fast-async
works, whiletransform-regenerator
chashes the interpreter (on all boards) - It is mandatory to use
hoist_funs
andhoist_vars
for uglify. Espruino does not handle hoisted transpiled code well.