UNPKG

947 BMarkdownView Raw
1# Unizin-lib
2A collection of accessible, styled, reusable React components for Unizin Engage and order-tool.
3
4### Usage
5
6`yarn install unizin-lib` will install the latest version. This library is under active development though, and frequent upgrades are recommended.
7
8Unizin-lib bundles both ES6 and CommonJS modules; a webpack project should use the ES6 modules by default.
9
10If you're using ES6 modules, you can rely on tree-shaking to eliminate unused code, rather than importing individual files. `import { Avatar } from 'unizin-lib'` is preferred over `import Avatar from 'unizin-lib/src/components/avatar'`.
11
12### Development
13
141. Install the dependencies (`yarn`).
152. Install Rollup.js globally (`yarn global add rollup`).
16
17### Storybook
18
19`yarn run storybook` will start up Storybook on port 6006.
20
21### Building
22
23`yarn run build` will build the production bundle.
24
25### Hooks
26
27Please copy the `pre-push` hook from `scripts/` into `.git/hooks`