project-react-component-library
v1.0.2
Published
Downloads
2
Readme
Test project to create react component library
Comandos utilizados
Inicialização do projeto
npm init
git init
Adicionar react
npm i --save-dev react react-dom @types/react
Adicionar arquivos iniciais de configuração link, repo
Typescript
npm i -D typescript
npm run build
obs.: Error: PostCSS plugin tailwindcss requires PostCSS 8. Solução
Storybook
npm install --save-dev @storybook/react @babel/core babel-preset-react-app babel-loader sass-loader
obs: Error, mudar "sass-loader": "^11.0.1", para "sass-loader": "^10.1.1"
Jest e React Testing Library
npm i --save-dev jest ts-jest @types/jest identity-obj-proxy @testing-library/react @testing-library/jest-dom
npm run test:watch
obs: npm install ts-node --save-dev
NPM
npm login
npm publish
Usar em outro projeto
npm install --save project-react-component-library