A simple react component boilerplate using webpack v2
git clone https://github.com/gokulkrishh/create-react-component && cd create-react-component
rm -rf .git && git init
npm install
(or) yarn
yarn install
.
├── __test__/
├── dist/
├── demo/
├── src/
│ └── index.js
│ └── styles.css
└── package.json
└── webpack.build.config.js
└── webpack.config.js
-
Webpack v2
for bundling the dependencies. -
ES6
support. -
ESLint
support. -
Jest
for test cases. -
Travis CI
support. -
Deploy demo page to
gh-pages
.
-
In
package.json
file change the name fromcreate-react-component
toyour-component-name
. -
Search for
HelloWorld
and replace it withyour component name
.
-
npm run start
- To start webpack dev-server. -
npm run watch
- To watch a file change and build the component. -
npm run build
- To produce the build file. -
npm run deploy
- To deploy the demo folder to gh-pages. -
npm run test
- To run test cases.
npm publish
Make sure your package name, version and other information in package.json
is correct.
- - cli similar to create-react-app
Found a bug or an improvement. File an issue and PR's are most welcome :)