Skip to content

vinniciusgomes/react-library-architecture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


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>