1.0.12 • Published 7 years ago
simple-component-native v1.0.12
Simple Component
Project Reactjs Component. Go from scratch /skrætʃ/.
- Step up webpack to dev, transpiler react syntax, webpack dev serve.
- Step up eslint.
- Publish project to NPM (Defined with one will be install)
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