adioslabs / tracespace

⚡️generate beautiful and accurate SVG renders of printed circuit boards

Home Page:https://tracespace.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tracespace

ci coverage dev dependencies chat

PCB visualization tools for Node.js and the browser

tracespace is an open-source collection of tools to make looking at circuit boards on the internet easier.

examples

Renders of the Arduino Uno produced by pcb-stackup and gerber-to-svg:

arduino uno top arduino uno bottom

Arduino Uno design files used under the terms of the Creative Commons Attribution Share-Alike license.

Individual layers

top copper

drill hits

outline

top silkscreen

bottom copper

top soldermask

bottom soldermask

tracespace in the wild

  • tracespace.io/view - A Gerber viewer powered by the tracespace libraries
  • kitspace.org - An electronics project sharing site with links to easily buy the required parts
  • OpenHardware.io - A social site around open source hardware. Enables authors to sell and manufacture their boards.

apps

This repository has one web-app that is published to https://tracespace.io

Probably the best printed circuit board viewer on the internet

A Gerber viewer powered by the tracespace libraries. Available at https://tracespace.io/view.

packages

This repository also contains several packages that are published to npm. See them all below!

latest next

Render PCBs as beautiful, precise SVGs from Gerber / NC drill files

latest next

Render PCBs as SVGs from the comfort of your own terminal

latest next

Layer stacking core logic for pcb-stackup

latest next

Render individual Gerber / NC drill files as SVGs

latest next

Streaming layer image plotter (consumer of gerber-parser)

latest next

Streaming Gerber/drill file parser

latest next

Identify Gerber and drill files by filename

latest next

XML ID generation and sanitation utilities for tracespace projects

latest next

Test fixtures for tracespace projects

contributing

We could use your help maintaining and growing the tracespace ecosystem! Issues and pull requests are greatly appreciated.

development setup

The tracespace tools live here in this monorepo. We use lerna to manage this setup.

Node v8 (lts/carbon) or later is recommended.

# clone repository and install dependencies
git clone git@github.com:tracespace/tracespace.git
cd tracespace
npm install

This repository adheres to the Conventional Changelog commit specification for automatic changelog generation. We recommend installing commitizen to ensure your commit messages are properly formatted:

npm install -g commitizen

# later, when you're ready to commit
git add some/files/*
git cz

All development scripts below should be run from the root of the repository. Lerna handles delegating scripts downwards to the individual projects as necessary.

tests

Automated tests consist of unit tests along with integration snapshot tests of SVG and data outputs.

# run unit and integration tests tests with coverage and linting
npm test

# set SNAPSHOT_UPDATE=1 to update integration test snapshots
SNAPSHOT_UPDATE=1 npm test

# run unit tests in watch mode (no coverage, no linting)
npm run test:watch

# set INTEGRATION=1 to also include integration tests
INTEGRATION=1 npm run test:watch

development servers

pcb-stackup, pcb-stackup-core, gerber-to-svg, and @tracespace/view have development servers. The first three serve a set of reference renders for manual visual inspection, and the @tracespace/view development server builds and serves the web-app locally.

# run all dev servers
npm run start

# run server for a specific project
npm run start -- --scope @tracespace/view

@tracespace/view can also build and serve its production assets as a sanity check before deploying:

npm run serve

linting and formatting

# format the code for styling
npm run format

# lint the code for potential errors
npm run lint

publishing

Packages are published to npm by the CI server. To publish a release, you must have write access to the repository. There is a bump script in the package.json that will:

  • Run all tests
  • Write new version to package.json in updated packages
  • Generate / update the changelogs
  • Commit, tag, and push to git

First, checkout and pull down the latest commits on master:

git checkout master
get pull origin master

Then, bump the version:

# by default, bump to the next version as determined by conventional commits
npm run bump

# you may specify a bump level or exact version
# prerelease bumps will be prefixed with "next", e.g. 4.0.0 -> 4.0.1-next.0
# https://github.com/lerna/lerna/tree/master/commands/version#readme
npm run bump -- ${major|minor|patch|premajor|preminor|prepatch|prerelease}
npm run bump -- v42.0.0

# to do a "dry run", you can stop before commit and tag
npm run bump -- --no-git-tag-version

After you bump, push the commit and tag:

git push origin master --follow-tags

The release will be published to the latest npm tag for bare versions (e.g. 4.0.0) and to next for pre-release versions (e.g. 4.0.0-next.0).

About

⚡️generate beautiful and accurate SVG renders of printed circuit boards

https://tracespace.io

License:MIT License


Languages

Language:JavaScript 98.1%Language:PLSQL 1.2%Language:TypeScript 0.6%Language:Game Maker Language 0.0%Language:CSS 0.0%Language:HTML 0.0%