my-super-cool-component-library
v0.0.11
Published
A simple template for a custom React component library
Readme
My Super Cool Component Library
A simple and reusable React component library with support for Storybook.
Table of Contents
Installation
To set up the project, clone the repository and install the dependencies:
Clone the repository
git clone https://github.com/your-username/my-super-cool-component-library.gitNavigate into the project directory
cd my-super-cool-component-libraryInstall dependencies
npm installRunning the Project
To build and run the project locally, follow these steps:
Build the component library:
npm run rollupPublish the component library:
npm publishRun tests (optional)
npm run testStorybook
Storybook provides a sandbox to develop and showcase your components.
Start Storybook:
npm run storybookBuild Storybook for production
npm run build-storybookScripts
Here are all the available npm scripts for the project:
| Script | Description |
|--------------------------|-----------------------------------------------------------------------------------------------|
| npm run rollup | Builds the library into CommonJS and ES module formats in the dist/ dir. |
| npm run test | Runs all test cases using Jest. |
| npm run storybook | Starts Storybook on http://localhost:6006. |
| npm run build-storybook | Builds a static version of Storybook in the storybook-static/ dir. |
