Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Mar 9, 2023. It is now read-only.

gokulkrishh/create-react-component

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

Releases

No releases published

Sponsor this project

Packages

No packages published

Contributors 2

AltStyle によって変換されたページ (->オリジナル) /