wire-lang
v0.3.0
Published
Text-first electronic schematics rendered to SVG. Aggregate package and `wire` CLI.
Maintainers
Readme
wire-lang
Text-first electronic schematics rendered to SVG. This is the user-facing
aggregate package: it re-exports the @wire-lang/core
API and ships the wire CLI.
npm install wire-langschematic
title "LED current limiting circuit"
description "A 5V battery drives a red LED through a 220 ohm resistor."
component BT1 Battery voltage=5V
component R1 Resistor value=220ohm
component D1 LED color=red
net VCC: BT1.+, R1.1
connect R1.2, D1.A
net GND: D1.C, BT1.-
annotation "Current limiting resistor" near R1
render direction=left-to-rightCLI
wire check led.wire
wire render led.wire --out led.svg
wire watch led.wire --out led.svgLibrary
import { renderSvg } from "wire-lang";
const svg = renderSvg(source); // throws WireLangError on fatal sourceThe full programmatic API (parse, compile, layout, serializeSvg, types,
diagnostics) is re-exported from @wire-lang/core. See the
project README for language
documentation and scope, and the
example gallery
for more rendered schematics.
License
MIT
