An example showing how to customize JSX to build a complex yaml file with type checking and code completion. I am using deno, But it can be done on other JavaScript runtime.
This is a example building dashboards.yaml
for
fava-dashboards
Run
deno run --allow-write='.' scripts/dashboards/buider.tsx
which genernate the dashboard.yaml file.
Inspired By This Article
Script Function are String by Function.prototype.toString()
, So only scope
will be difference when running and writing.