A starter kit for create a React component Library with storybook
Go to file
2022-09-15 14:21:19 +00:00
.github/workflows PR-126583: updating packages and adding CI/CD pipelines. 2022-08-02 14:03:18 +00:00
.storybook Updating packages and fixies some issues. 2022-06-10 14:09:26 +00:00
bin PR-747374: fixing npx. 2022-08-06 02:19:10 +00:00
src Updating packages. 2022-07-07 05:01:47 +00:00
.babelrc PR-188649: 2022-05-30 15:17:49 +00:00
.env.example PR-188649: 2022-05-30 15:17:49 +00:00
.eslintrc.js PR-188649: 2022-05-30 18:46:55 +00:00
.gitignore PR-188649: 2022-05-30 15:17:49 +00:00
jest.config.js Updating packages. 2022-07-07 05:01:47 +00:00
LICENSE Initial commit 2022-05-27 07:39:25 -06:00
package-lock.json PR-221589: updating packages. 2022-09-15 14:21:19 +00:00
package.json PR-221589: updating packages. 2022-09-15 14:21:19 +00:00
PRNameGenerator.ts PR-188649: 2022-05-30 15:17:49 +00:00
README.md PR-673141: Adding missing text on readme file 2022-08-06 02:37:59 +00:00
setupTest.ts PR-188649: 2022-05-30 17:25:45 +00:00
tsconfig.json PR-188649: 2022-05-30 15:17:49 +00:00
webpack.config.ts Exclude stories for webpack typescript validation. 2022-07-08 17:19:24 +00:00

Create React Component Library

This project aims to have a starter kit for creating a new React Library with storybook.

Setup

To create a new project run in the terminal:

npx @aleleba/create-react-component-library react-library

Then run:

cd react-library

You will need to create a new .env file at the root of the project for global config. This is an exaple of config.

#Library Name (Default: ui-library)
LIBRARY_NAME=ui-library
#External CSS (Default: false)
EXTERNAL_CSS=true
#External CSS NAME (Default: index.css)
EXTERNAL_CSS_NAME=other_name.css

For Development

In the terminal run:

npm run start

You will find the components on:

scr/components

You will find stories of storybook on:

scr/stories

This will start the app-library in development mode, also it have Hot Reloading! Enjoy coding!

For Production

In the terminal run:

npm run build

It will create a dist folder and run:

npm publish

This will publish on npm your package.

Cheers

Hope you enjoy this proyect! Sincerely Alejandro Lembke Barrientos.