Library.json and SPIFFS

Hi,
I’m building a library.

I store some files in “data” of the library to be written to SPIFFS (some “description” of the REST API defined in the library).

Do we have a way to include the “data” folder automatically in projects that use this library?

One of the solution would be to download these files on first run of the module (when connected to internet). But I prefer to include them at build time.

You can use extra script declared in library.json and copy your data files to env.subst(“$PROJECTDATA_DIR”).