Licence
—
Version
0.1.5
Deps
0
Size
36 kB
Vulns
0
Weekly
0
@mateusho/matech-components
Biblioteca de componentes compartilhados da Matech.
Instalacao
npm install @mateusho/matech-components
Uso rapido
import { Button } from '@mateusho/matech-components';
export function Example() {
return <Button>Novo curso</Button>;
}
Documentacao
- Uso da lib:
docs/USAGE.md - Manutencao e boas praticas:
docs/MAINTAINING.md - Publicacao da lib:
docs/PUBLISHING.md - Changelog e release notes:
CHANGELOG.md
GitHub
O repositório já pode usar GitHub Actions para:
- validar a lib em
pushepull_request - publicar no npm ao subir uma tag
v*.*.*
Arquivos:
.github/workflows/ci.yml.github/workflows/publish.yml
API publica atual
Componentes:
ButtonTypography
Helpers de tema:
createMatechPalettecreateMatechThemecreateMatechThemeOptionsgetMatechPaletteMatechThemeProvideruseMatechTheme
Defaults e factories de tema:
createMatechDefaultButtonPalettematechDefaultPalettematechDefaultButtonPalettematechDefaultGlobalPalettematechDefaultTypography
Tipos:
ButtonSizeButtonPropsButtonVariantTypographyAlignTypographyColorTypographyPropsTypographyVariantMatechButtonPaletteMatechButtonPaletteVariantMatechButtonTypographyMatechGlobalPaletteMatechPaletteMatechPaletteOptionsMatechTextVariantMatechThemeMatechThemeOptionsMatechThemeProviderPropsMatechTypographyMatechTypographyOptionsMatechTypographyVariantStyle
Desenvolvimento local
Storybook:
npm run storybook
Se a porta 6006 ja estiver em uso:
npm run storybook -- -p 6007
Build:
npm run build
Testes:
npm test
Coverage:
npm run test:coverage
Validacao antes de publicar:
npm run validate
Validacao completa de release:
npm run release:check
Hook local:
- o
pre-commitrodanpm run test:coverage
Publicacao
Fluxo sugerido:
npm version patch
npm run release:check
git push origin main
git push origin --tags
Observacoes:
- O pacote publica apenas
dist. - A lib depende apenas de
reactereact-domcomopeerDependencies. - Como o pacote usa
publishConfig.access = "public", a publicacao sai publica por padrao. - Para publicar como
@mateusho/matech-components, a conta no npm precisa ter acesso ao escopo@mateusho. - o workflow
.github/workflows/publish.ymlpublica no npm quando a tagvX.Y.Zchega no GitHub.