A starter kit for create a React component Library with storybook
Go to file
2024-10-29 17:33:26 -06:00
.github/workflows PR-883617: Actualización de dependencias y tokens de autenticación de NPM 2024-02-14 01:39:34 +00:00
.storybook PR-259604: Updating packages and fix css-loader. 2024-10-12 21:28:48 +00:00
bin PR-839242: Updating packages. 2024-10-29 23:28:12 +00:00
cypress PR-431618: updating packages and fixing the missing exports of types. 2024-10-21 18:37:42 +00:00
src PR-202408: updating packages and fixing mdx files. 2024-08-29 05:26:45 +00:00
.babelrc PR-188649: 2022-05-30 15:17:49 +00:00
.env.example PR-489489: Adding baseUrl. 2023-06-27 03:08:57 +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
.npmrc PR-883617: Actualización de dependencias y tokens de autenticación de NPM 2024-02-14 01:39:34 +00:00
cypress.config.ts PR-440978: Adding Cypress Component Testing. 2023-03-03 08:27:25 -06:00
jest.config.js PR-264673: fixing the conflict with cypress and jest. 2023-03-04 01:07:57 +00:00
LICENSE Initial commit 2022-05-27 07:39:25 -06:00
package-lock.json PR-839242: Updating packages. 2024-10-29 23:28:12 +00:00
package.json PR-839242: Updating packages. 2024-10-29 23:28:12 +00:00
PRNameGenerator.ts PR-188649: 2022-05-30 15:17:49 +00:00
README.md PR-189691: updating packages. 2023-06-27 14:58:24 +00:00
setupTest.ts PR-188649: 2022-05-30 17:25:45 +00:00
tsconfig.json PR-431618: updating packages and fixing the missing exports of types. 2024-10-21 18:37:42 +00:00
webpack.config.ts PR-431618: updating packages and fixing the missing exports of types. 2024-10-21 18:37:42 +00:00
webpack.cy.config.ts PR-431618: updating packages and fixing the missing exports of types. 2024-10-21 18:37:42 +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
#PREFIX URL (Default: '')
PREFIX_URL=

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.