VScode? #6600
Replies: 1 comment
-
Posted at 2021-06-21 by @gfwilliams Yes - you just install the Espruino command-line app from https://www.npmjs.com/package/espruino Worth noting that on Windows it can be tricky trying to get Bluetooth Low Energy comms to work nicely from Node.js. It's one of the reasons the Web IDE really helps. If it were possible to detect changes in a file using a web file API then we could make some changes and it'd be possible for you to use the Web IDE as just a terminal/upload tool for whatever editor you wanted - but it seems it isn't right now Posted at 2021-06-29 by sauerman
With which browser did you test this behavior? I think I used an application a few years ago which detected changes in a textfile on disk and it only worked w/ chrome. Posted at 2021-06-29 by @gfwilliams
I just did a quick search to see if it was possible and it seemed from the results that it wasn't. From a Chrome Web App it might be but they are getting deprecated soon. I don't profess to be an expert though. If you can find some code that works - or even better if you could modify the Web IDE at https://github.com/espruino/EspruinoWebIDE to make it work then it'd be amazing! Posted at 2021-06-29 by sauerman The Website where I saw it working is http://www.pokerstoker.com. Its not an Chrome Web App. It loads a HandHistory.txt file. And everytime a new hand is added to the file the view updates. ATM I just want to code my Bangle to fit my needs, maybe after that I will take a look at the IDE :) Posted at 2021-07-06 by sauerman So I did some research. We could use the new "File System Access" API -> https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileHandle The WebApi would need to poll for filechanges tho. After a set interval it would check if Would that solution be accepted? Posted at 2021-07-07 by @gfwilliams Thanks! That sounds great! Are you able to implement it? It seems like you've got two options...
The benefit of the 'open' modification is we could actually get Posted at 2021-07-11 by sauerman espruino/EspruinoWebIDE#254 ;) not sure if you approve Posted at 2021-07-26 by @gfwilliams Thanks! Sorry for the delay - I'll take a look when I get through all my messages after the holiday! Posted at 2021-07-28 by @gfwilliams More details on espruino/EspruinoWebIDE#254, but if you try the development IDE (for now) at https://espruino.github.io/EspruinoWebIDE... open a file (which is as normal), then click the down-arrow to choose what happens. If you choose the 'upload' option then every time the file changes, the editor contents will be reloaded and the file sent to the device - which should be great for integration with VSCode/etc. You can also pull the middle of the window over, so all you see is the terminal window each time. Posted at 2021-12-22 by enricorov Hijacking this thread to ask - would piping the emulator window to a tab in VS Code be possible with an extension? I haven't looked at this properly, but it seems the IDE won't arbitrarily attach to an emulator tab and tries spawning a new one every time. Posted at 2021-12-26 by user138057 Is there any guide or something to show how to setup development environment for VSCode? Posted at 2022-01-05 by @gfwilliams
Maybe, yes - you could just host the whole Web IDE inside VS code I guess? But using the steps I posted above you can still load files you write with VS code - it's just you don't get the console in the same window.
Not that I'm aware of - but you can use use it as a normal JS editor and then using steps above you just make the IDE upload the file each time it changes |
Beta Was this translation helpful? Give feedback.
-
Posted at 2021-06-20 by user130486
This might have already been asked but is there anyway I can use vscode for Espruino or are we stuck with the web ide?
Beta Was this translation helpful? Give feedback.
All reactions