/* Rebuilds tools/wiring.html from tools/wiring-src/* and hardware/layout.js (the one source of truth).
Run after editing the layout: node hardware/check-layout.js && node tools/build-wiring.js */
var fs=require('fs'), path=require('path'), d=__dirname;
function rd(p){ return fs.readFileSync(path.join(d,p),'utf8'); }
var html=rd('wiring-src/head.html')+rd('wiring-src/body.html')+'';
fs.writeFileSync(path.join(d,'wiring.html'),html); console.log('wrote tools/wiring.html',html.length,'bytes');