A browser extension for people interested in electronics. The initial version will:
- Render .kicad_pcb files on Github
- Allow you to "buy parts" on kitspace.org and port most of the rest of the functionality of 1clickBOM.
Set up Nodejs (version 16 or higher) and install Yarn (v1/classic). Clone this repo and install all dependencies by running:
git clone https://github.com/kitspace/web-extension
cd web-extension
yarn
This project uses the kitspace-v2 API to process files. Ask @kasbah for an API key and create a secrets.development.js with:
export const KITSPACE_PROCESSOR_API_KEY = 'your key'The build system is adapted from chrome-extension-boilerplate-react. It currently builds both a manifest-v3 Chrome extension and a manifest-v2 Firefox/WebExtension.
yarn devto auto-rebuild the extension intobuild/manifest-v3/load that folder as an unpacked extension in Chrome. Most changes will require you to manually reload the extension in Chrome.yarn dev v2to auto-rebuild intobuild/manifest-v2/(for Firefox and maybe Safari) and thenyarn web-ext runto open/auto-reload it in a vanilla browser profile.yarn storybookwill run a Storybook component preview on localhost:6006. This is useful for fast-reload of React components and currently the only way to test it with a custom/development version of the kitspace-v2 API running over http.
yarn buildwill output tobuild/manifest-v2/andbuild/manifest-v3/in production mode.yarn web-ext sign --api-key <addon-api-key> --api-secret <addon-api-secret>will make an unlisted but signed .xpi file that you can "load from file" in Firefox.
yarn lint --fixto lint and to auto-fix any issues where it can.yarn fmtto auto-format everything with Prettier.yarn tscto typecheck with Typescript.yarn web-ext lintwill lint the build output inbuild/manifest-v2/.