README
Table of Content
Before use
Requeriment
Names | Version |
---|---|
classnames | ^2 |
prop-types | 15.7 |
react | ^16 |
react-dom | ^16 |
react-test-renderer | ^16 |
@material-ui/core | ^4.8.0 |
@material-ui/icons | ^4.5.1 |
styled-components | ^4.4.1 |
Create new Components
Clone and install the repository
git clone git@bitbucket.org:grupoblidoo/cv-lib-app-components.git
cd cv-lib-app-components && npm ci
Create a new folder and component files like this
Component.js : Component code
Component.md : Component documentation and examples
styles.js : Component styles (styled-components and material ones) [OPTIONAL]
Add component to StyleGuidist config file
file : styleguide.config.js
name : Section title
components : Section components
content : Extra section Information
Add component to RollUp config
Rollup is the library responsible for generating the dist folder
file : rollup.config.js
key : Component name (It will be used on dist)
value : The path of component main file
Commands
Run Styleguidist
npm start
Check Eslint
npm run eslint
Generate dist folder
npm run build
Prepare S3 files
npm run build:prod