espruino / EspruinoWebIDE

The Espruino Web IDE - A Chrome Web App for programming Espruino
Apache License 2.0
367 stars 158 forks source link

File System Access API #247

Open gniezen opened 3 years ago

gniezen commented 3 years ago

Hi there!

I'm just wondering if there are plans to use Chrome's new File System Access API (https://web.dev/file-system-access/) to handle opening and saving of source files in the Web IDE?

gfwilliams commented 3 years ago

I didn't personally have plans but it's something I'd love to get included, and should be reasonably easy to do.

Currently we also have the 'Projects' plugin that works when the IDE is used as a Chrome app, and it'd be great to be able to modify that (or just duplicate functionality) such that modules could be pulled from a local folder too.

gfwilliams commented 3 years ago

Some decent steps towards this are now in 3970caa2b938db985dda2280635536f43087c44b

Pringels commented 1 year ago

I'd be happy to port the existing projects functionality over to the File System Access API

gfwilliams commented 1 year ago

That would be great, thanks! I've recently pushed some big changes to https://github.com/espruino/EspruinoWebIDE/blob/master/js/core/file.js to allow multiple files, but also to use window.showSaveFilePicker/etc so at least we are using the new API there, but moving projects to it would be great.