vinniciusgomes / react-library-architecture

๐Ÿ›  Archref for React Library with TypeScript

Home Page:https://vinniciusgomes.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


logo

GitHub language count Repository size GitHub last commit Repository issues License Stargazers

Principles

  • Dependencies
    • All build-time dependencies must be defined in peerDependencies
      • It also necessaries add do devDependencies
    • dependencies it just added if the library has an specific dependencies
  • Testing library
    • Use demo application for validate your library
    • Use npm link to validate integration resources link

Building with Rollup

  • Apart from compile TS to JS, it is currently prepared to handle fonts, images (svg,png,jpg,jpeg,gif) and json
    • fonts are copied and referenced
    • JSONs are embeded in the bundle
    • Images are encoded to base64 and are bundled or chunked

Before releasing new library

  • Do not forget to delete MyComponent
    • It is only a sample
  • Edit Readme, filling template below with valid information
  • Edit Changelog to reflect new library
  • For new components, use the template below to describe it

Components

MyComponent

  • Props
interface MyComponentProps {
  children: ReactChild
}
  • Usage
import { MyComponent } from 'react-library-architecture';

<MyComponent>valid-text</MyComponent>

About

๐Ÿ›  Archref for React Library with TypeScript

https://vinniciusgomes.dev

License:MIT License


Languages

Language:JavaScript 58.2%Language:TypeScript 41.8%