@billups/grimoire
v1.16.0
Published
Billups design components implemented in React
Downloads
81
Readme
grimoire
Billups design components implemented in React
Getting Started
Clone this repo and run the following command from the directory the clone resides in.
Make sure that you have NodeJS >= 8.x and NPM installed. If you already have node installed, verify with:
node --version
Now run yarn (with no flags) to install (dev) dependencies. (you can download yarn following the instructions on https://yarnpkg.com/en/docs/install)
yarn
Development
You can spin up a local storybook instance by running
yarn storybook
This is will allow you to see currently available components as well as components you are working on.
While working on a component, you should add a corresponding story file to the stories
folder with the following pattern: component.stories.tsx
.
Testing
All the tests for the components can be run with the yarn test
script.
Once you are finished with most of the iteration of a component please add a snapshot test for that component as well. Any tests should reside in a __tests__
folder that lives in the same directory as the component you are testing and should have the same filename as the component.
If you need to update a component snapshot running yarn test -u
will accomplish that.
Building
This project uses rollup for bundling and generating type definitions for the components. Simply run yarn build
and the bundles as well as the typedefs will be generated in the dist
folder.