Tooling
typeCAD has a command-line tool to generate all the boilerplate code for a package. It sets up the package for easy publishing and reuse.
The tool creates a package to write typeCAD-related code. If you’re interested in a more utility-focused package rather than creating/placing/connecting components, you can simply create an npm package with npm init
.
Execute the following command in ./hw
of an already existing typeCAD project.
npx @typecad/add-package ./src
You’ll see two options after running the script:
- Empty Package: create an empty package
- Component Package: creates a package based around a component. This is useful for creating reference designs around a component, for example.
If you choose an empty package, the script will create a directory and package structure and then give you instructions on how to import
it into your project. If you choose a component package, it will ask you for the symbol and footprint files for the main component the package will be based around. The package will additionally include more boilerplate code for creating that component in the package.
On This Page