observablehq / framework

A static site generator for data apps, dashboards, reports, and more. Observable Framework combines JavaScript on the front-end for interactive graphics with any language on the back-end for data analysis.
https://observablehq.com/framework/
ISC License
2.52k stars 121 forks source link

Watch multiple files for data loaders with multiple sources #990

Open Fil opened 8 months ago

Fil commented 8 months ago

A data loader is not always a single file (it could be data.csv.py calling data-analysis.py and data-model.py. Or a .sh loader calling deno or bun on a .ts file). The timestamp technique we use to decide if a file is stale —and the preview watcher— only consider the entry point data.csv.py. It would be nice to have a mechanism to extend this to more files; however I can't think of one that would be generic without some sort of opt-in configuration.

Adjacent to #332

mbostock commented 8 months ago

For JavaScript, this is already covered by #204.