Skip to content
This repository was archived by the owner on Mar 9, 2023. It is now read-only.

gokulkrishh/create-react-component

Folders and files

NameName
Last commit message
Last commit date
Apr 20, 2017
Apr 20, 2017
Apr 20, 2017
Apr 20, 2017
Feb 6, 2017
Feb 6, 2017
Feb 13, 2017
Feb 13, 2017
Feb 6, 2017
Feb 6, 2017
Feb 6, 2017
Apr 20, 2017
Feb 6, 2017
Apr 20, 2017
Feb 6, 2017
Feb 13, 2017
Jul 20, 2020

Repository files navigation

A simple react component boilerplate using webpack v2

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.

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

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