seveibar/nema17-rp2040-stepper-controller

A tscircuit package created by seveibar.

Version
0.3.1
License
unset
Stars
0

scripts/analyze-style.ts

import { analyzeSchematicPlacement } from "../vendor/schematic-style-analysis";
const file = process.argv[2] ?? "dist/schematic/circuit.json";
const analysis = analyzeSchematicPlacement(await Bun.file(file).json());
await Bun.write(
	"reports/schematic-style.json",
	JSON.stringify(analysis.getIssues(), null, 2),
);
console.log(analysis.toString());
console.log("Issue count:", analysis.getIssues().length);

if (analysis.getIssues().length) process.exitCode = 1;