simple-react-component v1.0.1
Create React Component 
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-component2. Make it as your own repository
rm -rf .git && git init3. Install dependencies
npm install(or) yarn
yarn installFolder Structure
.
├── __test__/
├── dist/
├── demo/
├── src/
│ └── index.js
│ └── styles.css
└── package.json
└── webpack.build.config.js
└── webpack.config.jsFeatures
Webpack v2for bundling the dependencies.ES6support.ESLintsupport.Jestfor test cases.Travis CIsupport.Deploy demo page to
gh-pages.
Make it as your own component
In
package.jsonfile change the name fromcreate-react-componenttoyour-component-name.Search for
HelloWorldand replace it withyour 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 publishMake 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
8 years ago