Simple Component
This project huge inspice by Element Vue (React)
Rules for contribute component
- If props for event please add
on
before, example:onChange, onInput, onFocus, onLeave
Install
npm install simple-components-react
Todo
Project Reactjs Component. Go from scratch /skrætʃ/.
- Step up webpack to dev, transpiler react syntax, webpack dev serve.
- Publish project to NPM (Defined which one will be install)
- Step up eslint.
- Step up new docs with seperate page for component
- Step up test
- Step up CI/CDs
- Step up precommit? (Optional)
Test
- Snapshots
Step up project:
For detail go google search : ).
- Install webpack, webpack-cli (the bundler)
npm i webpack webpack-cli
. - Install babel transpiler
npm i @babel/core @babel/plugin-proposal-class-properties @babel/preset-env @babel/preset-react
. - Create folder
src
,src/components
,src/index.js
,dist/index.html
. - Create webpack config file
tools/webpack.config.js
,tools/webpack.prod.js
- Create babel config file
.babelrc
- Add script to npm
"start": "webpack-dev-server --watch --mode development --config tools/webpack.config.js"
- Add webpack config with 3 files in tools
Directory
├── dist
│ └── index.js
├── src
│ ├── components (All component go here)
│ ├── util
│ ├── index.html (template ver devserver)
│ ├── build.js (file import all components for build)
│ └── index.js (file for reactDom run devserver)
├── styles
│ ├── *.scss
│ ├── variables.scss
│ └── index.scss (import all file scss)
└── tools
├── webpack.dev.js
└── webpack.build.js