@tufte/chart-cli
v0.2.0
Published
Render `chart` fenced blocks to ASCII — pre-render markdown in place, or pipe a spec via stdin.
Maintainers
Readme
@tufte/chart-cli
Render chart blocks to Tufte-style ASCII — from the command
line. Two modes.
npm install -g @tufte/chart-cliPre-render markdown in place
Find every ```chart block in a file, render it, and embed the result (with its
source) back into the document. Idempotent — safe to run in a pre-commit hook or
CI so committed markdown shows real charts everywhere, no plugin required.
chart render README.md --writeWithout --write, the rendered document is printed to stdout. Inline sparklines
(a one-backtick `sparkline: 12 24 36` span) are baked too, into a recoverable
one-line carrier so the source survives.
Pipe a spec
printf 'line "Latency"\n0:00, 22\n8:00, 68\n12:00, 110\n' | chartprints the chart to stdout.
Ecosystem
@tufte/chart-core— the renderer + format spec@tufte/markdown-it-chart— markdown-it plugin@tufte/remark-chart— remark/unified plugin
