A simple react component boilerplate using webpack v2
git clone https://github.com/gokulkrishh/create-react-component && cd create-react-componentrm -rf .git && git initnpm install(or) yarn
yarn install.
├── __test__/
├── dist/
├── demo/
├── src/
│ └── index.js
│ └── styles.css
└── package.json
└── webpack.build.config.js
└── webpack.config.js
-
Webpack v2for bundling the dependencies. -
ES6support. -
ESLintsupport. -
Jestfor test cases. -
Travis CIsupport. -
Deploy demo page to
gh-pages.
-
In
package.jsonfile change the name fromcreate-react-componenttoyour-component-name. -
Search for
HelloWorldand 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 publishMake 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 :)