JSPM

@tracespace/parser

5.0.0-next.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4027
  • Score
    100M100P100Q127055F
  • License MIT

Gerber and NC drill file parser

Package Exports

  • @tracespace/parser

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@tracespace/parser) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@tracespace/parser

A parser for printed circuit board manufacturing files. Compiles Gerber and 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

usage

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:

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