# @tracespace/parser

> Gerber and NC drill file parser

Latest version **5.0.0-next.0** (published 2020-06-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @tracespace/parser
pnpm add @tracespace/parser
yarn add @tracespace/parser
bun add @tracespace/parser
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.0.0-next.0 |
| Published | 2020-06-28 |
| First published | 2020-06-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 905.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 952 |
| Maintainers | mcous |
| Keywords | gerber, excellon, pcb, circuit, hardware, electronics |

## Links

- npm: https://www.npmjs.com/package/@tracespace/parser
- Repository: https://github.com/tracespace/tracespace
- Homepage: https://github.com/tracespace/tracespace#readme
- Issues: https://github.com/tracespace/tracespace/issues
- npm.io page: https://npm.io/package/@tracespace/parser

## Dependencies (3)

- [moo](https://npm.io/package/moo.md) ^0.5.1
- [@types/moo](https://npm.io/package/@types/moo.md) ^0.5.0
- [@types/unist](https://npm.io/package/@types/unist.md) ^2.0.3

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 5.0.0-next.0 (latest) — 2020-06-28
- 5.0.0-alpha.0 (next) — 2023-01-16

## README

# @tracespace/parser

A parser for printed circuit board manufacturing files. Compiles [Gerber][gerber] and [NC drill][nc-drill] files into abstract syntax trees based on the [unist][] format.

Part of the [tracespace][] collection of PCB visualization tools.

**This package is still in development and is not yet published**

[gerber]: https://en.wikipedia.org/wiki/Gerber_format
[nc-drill]: https://en.wikipedia.org/wiki/PCB_NC_formats
[unist]: https://unifiedjs.com/
[tracespace]: https://github.com/tracespace/tracespace

## usage

```js
import {createParser} from '@tracespace/parser'
// commonjs is cool, too
// const {createParser} = require('@tracespace/parser')

const parser = createParser()
parser.feed(/* ...some gerber string... */)
const tree = parser.results()
```

### script tag

If you're not using a bundler and you want to try out the parser in a browser, you can use a `script` tag:

```html
<script src="https://unpkg.com/@tracespace/parser"></script>
<script>
  // global variable TracespaceParser now available
  const parser = TracespaceParser.createParser()
</script>
```

---
_Source: https://npm.io/package/@tracespace/parser · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
