You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 10, 2019. It is now read-only.
A printed circuit board Gerber and drill file parser. Implemented as a Node transform stream that takes a Gerber text stream and emits objects to be consumed by some sort of PCB plotter.
how to
$ npm install gerber-parser
varfs=require("fs");vargerberParser=require("gerber-parser");varparser=gerberParser();parser.on("warning",function(w){console.warn("warning at line "+w.line+": "+w.message);});fs.createReadStream("/path/to/gerber/file.gbr").pipe(parser).on("data",function(obj){console.log(JSON.stringify(obj));});
To run in the browser, this module should be bundled with a tool like browserify or webpack.
Tests are written in Mocha and run in Node and a variety of browsers with Zuul and Open Sauce. All PRs should be accompanied by unit tests, with ideally one feature / bugfix per PR. Code is linted with ESLint.
Code is deployed on tags via TravisCI and code coverage is tracked with Coveralls.
build scripts
$ npm test - runs Node unit tests, calculates coverage, and runs the lint task
$ npm run coverage - print the coverage report of the last test run
$ npm run coverage:html - generate an html report for the last test run
$ npm run lint - lints code
$ npm run test:watch - runs unit tests and re-runs on changes
$ npm run test:browser - runs tests in a local browser
$ npm run test:sauce - runs tests in Sauce Labs on multiple browsers