Skip to content

Latest commit

 

History

History
35 lines (27 loc) · 2.53 KB

File metadata and controls

35 lines (27 loc) · 2.53 KB

Examples

Runnable snippets for each output method and main options. Output goes to examples/out/.

Run from repo root:

deno run -A examples/<name>.ts

Replace <name> with any script below (e.g. basic-svg, formats).

File What it does
basic-svg.ts toSVG() minimal (value + size) → basic.svg
colors-full.ts Solid + background, radial gradient, radial with fx/fy → 3 SVGs
error-levels.ts Error levels L, M, Q, H → error-level-L.svgerror-level-H.svg
finder-module.ts Finder shape ≠ module shape (square vs circle) → finder-module.svg
formats.ts toDataURL, toASCII, toTableTag → log + qr-table.html
logo-full.ts Logo text+size+radius, logo image (data URI), radius cutout → 3 SVGs
path-and-canvas.ts toPathpath-only.html; toCanvascanvas-qr.html (open in browser)
png.ts toPNG() data URL → decode and write qr-default.png, qr-colored.png
shapes-all.ts All 7 module shapes → shapes-rounded.svgshapes-triangle.svg
shapes-and-colors.ts Rounded/circle, linear gradient, logo text → 4 SVGs
svg-a11y.ts toSVG() with title/alt → svg-a11y.svg (role, <title>, )
to-file-stream.ts toFileStream(stream, SVGOptions)to-file-stream.svg
to-file.ts toFile(path, SVGOptions)to-file.svg
to-img-tag.ts toImgTag() default and custom alt/size → qr-img.html

All scripts use import QRCode from '@neabyte/qr-generator' (resolved via deno.json when run locally).

Reference

  • README.md — Installation and quick start.
  • USAGE.md — Options, shapes, gradients, logo, API reference.