No description
- TypeScript 100%
| .gitignore | ||
| deno.jsonc | ||
| Plotly.md | ||
| plotly.plug.js | ||
| plotly.plug.yaml | ||
| plotly.ts | ||
| plotly_core.test.ts | ||
| plotly_core.ts | ||
| README.md | ||
SilverBullet plug: Plotly
Interactive Plotly visualizations inside
SilverBullet via a plotly code widget: a ```plotly fenced block whose body
is YAML.
Using the plug? See
Plotly.mdfor every option, mode and example. This README is for development.
Layout
| File | Role |
|---|---|
plotly_core.ts |
Pure logic: validation, defaults, traces, layout, query expansion. No syscalls, so it is unit tested. |
plotly.ts |
Widget entry point: syscalls, query execution, script generation. |
plotly_core.test.ts |
Deno tests for the above. |
plotly.plug.js |
Build artifact, committed — the file users install. |
Keep decisions about what a chart looks like in plotly_core.ts; only plotly.ts should touch syscalls or generate code. Config errors render as an inline "Plotly error" widget — the plug never throws.
Development
Needs Deno 2.x.
deno task check # type check
deno task test # unit tests
deno task lint # lint
deno task fmt # format
deno task build # compile plotly.plug.js
After changing a chart, rebuild and commit the artifact with the sources. The build is reproducible, so a dirty diff after deno task build means the committed plug is stale.