Best way for offline development #6776
Replies: 1 comment
-
Posted at 2024-04-28 by @devsnd I've also played around with multiple ways developing and my highest priority in developing is using familiar tools with quick iteration times. Since Bluetooth pairing is very finicky for me (i.e. switching from phone to pc and back), I always either use the emulator or connect through the web IDE remotely in gadget bridge. I use JetBrains to develop and have a script that takes the app.js and copy pasted it into the web IDE. From there I upload it automatically to the emulator or the watch over the remote IDE connection. Pro:
Con:
(I am a bit shocked that the infamous and prolific HalEmmerich does not have a more advanced setup. ;) thanks for all the small improvements and apps!) Posted at 2024-04-28 by @halemmerich Thanks for the compliments ;) My first developments were either directly using hardware (GPS/BT) or depended on boot code so the emulator wasn't great for developing those which prompted me to just use the real thing. I got a spare Bangle for this so my daily driver can stay connected to GadgetBridge all the time. The IDE has some really nice features like getting the value of variables by hovering over them in the source while using the debugger and autocompletion for most of the Bangle/Espruino-specific APIs. I don't know if that could easily be replicated otherwise. Posted at 2024-04-29 by @gfwilliams
You can run the IDE and if you click the down-arrow next to the 'open file' button you can 'watch' a file - so when the file changes the IDE will automatically reload it and upload it.
Good question - it uses WebRTC which is peer to peer, but to establish that connection in the first place I think it needs a kind of broker server, so you have to be online for that :( Posted at 2024-04-30 by @halemmerich What is the correct way to use locally hosted web IDE with locally hosted modules without CORS getting in the way? Linking the folders and using jekyll to host the IDE works fine but it feels a bit convoluted. Running with NPM does not have working bluetooth on my system:
Can I somehow install a complete app to the emulator without installing all files by hand? Maybe running an emulator externally and sharing it between IDE and appstore? Posted at 2024-04-30 by @gfwilliams
I just have an Apache server and I have the ide in
Not yet - in theory the app store could send all the commands it'd send to a real Bangle over to the emulator, but I haven't done that yet. In a way it'd be an interesting way to even test the complete app store without a real device Posted at 2024-04-30 by @halemmerich Huh, with that hint I can simplify my script down to running jekyll in the parent directory of all my checked out repos and just point the IDE to Web Bluetooth works fine for me when hosting with jekyll as http server as well but it does not work when starting with |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-04-28 by @halemmerich
I'm interested in the communities workflows for development, especially on the Bangle.
Mine is as follows on Arch Linux:
localhost:4000
andlocalhost:4001
in chromium.Gotchas:
BangleApps/modules
andEspruinoDocs/modules
toEspruinoWebIDE/[b|e]mod
dirs and sethttp://localhost:4001/bmod|http://localhost:4001/emod
as module dirs in the web IDE. Otherwise CORS prevents me from loading modules.I have played around with using the CLI tools for upload with the options for watching files which works fine but I always come back to the browser based method since it it a bit more finicky on the command line.
What are your top tips on developing offline?
Script for starting the environment:
Beta Was this translation helpful? Give feedback.
All reactions