Clearkit
First Time Setup
Icon Shenanigans
Any time you bump the version of @clearkit/icons
, be sure to run the following incantation to re-generate the React-ified version of all the icons.
yarn svg:jsx
If all goes well, you should see a bunch of output like the following, and you should have a clean git tree.
node_modules/@clearkit/icons/icons/glyphs/add.svg -> src/icons/Add.ts
node_modules/@clearkit/icons/icons/glyphs/add-block.svg -> src/icons/AddBlock.tsx
node_modules/@clearkit/icons/icons/glyphs/audience.svg -> src/icons/Audience.tsx
Install Other Dependencies
Easy peasy!
yarn
Develop Locally
I suggest developing against Storybook, which pulls in src/index.tsx
(the main entry point for the library) and does hot module reloading for you.
yarn storybook
Run the tests with the following incantation, making use of the optional --watch
flag.
yarn test
Publish New Versions
I use the tool np
(which I have installed globally) for deploying new versions of the library.
When you're ready to deploy and your changes are pushed to master, run np
and it will walk you through the various steps –
- Verifying tests pass
- Choosing a new version number
- Auto-tagging and release notes
- Publishing to NPM.