I'm using the Espruino CLI (from npm), but I couldn't find any way to get some IDE functionality such as uploading files to storage (there's a "--storage" flag, but I can't find much in terms of what do I have to pass to it to get files to storage).
# Write mycode.js to the first Bangle.js device found as a Storage file named app.js
espruino -d Bangle.js mycode.js --storage app.js:-
# As above, but also write app_image.bin to the device as a Storage file named app.img
espruino -d Bangle.js mycode.js --storage app.js:- --storage app.img:app_image.bin
I think that should do you? I'm not 100% sure how it works uploading files to storage without also uploading JS though.
Is there a way to send multiple files to the device simultaneously?
Yes - see above. Just you can't convert multiple JS files at once, but if you're happy copying them verbatim it's fine.
The IDE appears to hold a BLE connection active across multiple commands, but each command via CLI creates and stops a connection
Have you tried the 'remote connection' option which uses your phone for the connection?
But since the CLI is an app that has to start and stop, if you're using it to connect then the connection will drop.
You can just use the IDE and set the IDE to watch a file for changes - then it'll keep the connection open and every time you save the file it'll re-upload it.
Is there a standalone emulator that I can use outside of the web ide?
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.
https://github.com/espruino/EspruinoTools#readme shows:
I think that should do you? I'm not 100% sure how it works uploading files to storage without also uploading JS though.
Yes - see above. Just you can't convert multiple JS files at once, but if you're happy copying them verbatim it's fine.
Have you tried the 'remote connection' option which uses your phone for the connection?
But since the CLI is an app that has to start and stop, if you're using it to connect then the connection will drop.
You can just use the IDE and set the IDE to watch a file for changes - then it'll keep the connection open and every time you save the file it'll re-upload it.
I think someone did do something, but there is also https://github.com/espruino/BangleApps/blob/master/bin/runapptests.js which you can use to run an app in an emulator from the CLI, then perform tests on it.