0.0.6-snapshot • Published 4 years ago
@krishnahingu/ui-lib
Licence
ISC
Version
0.0.6-snapshot
Deps
9
Size
160 kB
Vulns
0
Weekly
0
React Component Library as ui-lib
Requirements
- Node 16.X
- Yarn 2.X
- Webpack 5.X
- Typscript
- TS-Node
- React 17.X
Installation
- Clone the project from GitLab
- Use
yarn installto update the packages. - Use
yarn buildto build the project. - local development TBC
- After successfull build, The project will create a
libdirectory - In
libdirectory there should be 3 types of exported module- CommonJS
- Esm
- UMD
Now the exported module are ready to use in any react project using npm or yarn as ui-lib as dependency.
// Example
import {Button} from 'ui-lib';
const MyComponent = ()=>{
return(
<Button>My Button</Button>
)
}
Storybook
Run local development storybook
- use
yarn storybookto run the dev server, it will run athttp://localhost:4200
Run build
- use
yarn build-storybookto create production build of storybook. It will create separate directory of build filestorybook-static.