Webpack babel based boilerplate for creating React Apps (Input: ES6, Output: bundled es5 version)
- Webpack 4.
- ES6 as a source.
ES6 source files
|
|
(webpack + babel)
|
|
|
Bundle
Result:
project
|
|__ src
| |__ index.js (es6)
| |__ index.html
|
|__ dist
|__ app.js (es5)
|__ index.html
- Create your App project
npm init
npm install --no-save git+http://github.com/StateTree/webpack-react-app-boilerplate.git
- This will create src, dist, test, docs directory
- Creates babel and webpack config
- Updates your package.json properties
devDependencies
,dependencies
andscripts
- Removes itself from your node_modules project
npm run start
- webpack dev servernpm run lint
- test and fix lint errornpm run prebuild
- Removes the dist foldernpm run build
- produces bundle version of your project under thedist
folder.npm run postbuild
- buildconfig inside scripts is used to executecopy operation
npm run publish
- publish to github gh-pages
- Test Framework
- Doc support
- Release Version Incrementer Support