Webpack babel based boilerplate for creating React Apps (Input: ES6, Output: bundled es5 version)
- Webpack 3.
- ES6 as a source.
ES6 source files
|
|
(webpack + babel)
|
|
|
Bundle (umd)
Result:
project
|
|__ src
| |__ index.js (es6)
|
|__ lib
|__ index.js (es5) Bundled
- Create your App project
npm init npm install git+http://github.com/sanjay-boilerplates/webpack-react-library.git- This will create src, lib, demo, test, docs directory
- Creates babel and webpack config
- Updates your package.json properties
devDependencies,dependenciesandscripts - 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 thelibfolder.npm run postbuild- buildconfig inside scripts is used to executecopy operationnpm run publish- publish to github gh-pages for demo
- Test Framework
- Doc support
- Release Version Incrementer Support