• Hi,
    I took a gander at the source code here. And while I'm not amazing at reading C, I can read comments. It looks like currently there's no way to load a file that is co-located within the same folder.

    I have a project that has a bunch of other stuff besides the Espruino code so I'm trying to avoid using the Espruino playground folder since that wouldn't be under the same source control. For more context, my project directory structure is:

    /project_root
      LEDServer.js
      warningGif.js
      ... other non-espruino stuff ...
    

    LEDserver.js is basically a server that understands some animation binary data from a request. warningGif.js is a file with a pre-built animation I'd like to load when things go awry, like one of the incoming frames eating up too much current. It doesn't seem like this is possible in the current setup.

    I even tried hacking this a bit, allowing NPM in the Web IDE settings, and using a node_modules folder to house warningGif.js but alas, this refuses to upload to the device (an ESP32).

    I'm not sure I'd be able to do it but I wouldn't mind trying. If I pulled together some C code to look up a file locally and made a PR, would that be something folks would be interested in? Is there some technical reason you can't do this?

About

Avatar for phil303 @phil303 started