A simple react component boilerplate using webpack 2
Branch: master
Clone or download
Latest commit 4993af4 Apr 20, 2017

readme.md

Create React Component Build Status

A simple react component boilerplate using webpack v2

Demo

Get Started

1. Clone the repository
git clone https://github.com/gokulkrishh/create-react-component && cd create-react-component
2. Make it as your own repository
rm -rf .git && git init
3. Install dependencies
npm install

(or) yarn

yarn install

Folder Structure

.
├── __test__/
├── dist/
├── demo/
├── src/
│   └── index.js
│   └── styles.css
└── package.json
└── webpack.build.config.js
└── webpack.config.js

Features

  • Webpack v2 for bundling the dependencies.

  • ES6 support.

  • ESLint support.

  • Jest for test cases.

  • Travis CI support.

  • Deploy demo page to gh-pages.

Make it as your own component

  • In package.json file change the name from create-react-component to your-component-name.

  • Search for HelloWorld and replace it with your component name.

Available scripts

  • 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.

Publish as node module

npm publish

Make sure your package name, version and other information in package.json is correct.

TODO

  • - cli similar to create-react-app

Found a bug or an improvement. File an issue and PR's are most welcome :)

License

MIT © Gokulakrishnan Kalaikovan