AnasSarkiz/NEMA14_RP2040
A NEMA motor assembly concept with a controller board, four proposed M3 screws and spacers, motor lead splices, and a JST 4-pin connector harness.
- Version
- 1.13.0
- License
- ISC
- Stars
- 0
scripts/refresh-schematic.ts
import {readFileSync,writeFileSync} from 'node:fs'
import {prepareSchematic} from './prepare-schematic'
const path='artifacts/final-source.circuit.json';const old=JSON.parse(readFileSync(path,'utf8'));const updated=prepareSchematic(old)
if(JSON.stringify(old.filter((e:any)=>!e.type.startsWith('schematic_')))!==JSON.stringify(updated.filter((e:any)=>!e.type.startsWith('schematic_'))))throw Error('Schematic generation modified non-schematic records')
writeFileSync(path,JSON.stringify(updated,null,2)+'\n');console.log('Rebuilt',updated.filter((e:any)=>e.type==='schematic_sheet').length,'functional sheets')