A simple boilerplate for React component development
JavaScript CSS HTML
Pull request Compare This branch is even with jeremyxgo:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
test
.babelrc
.gitignore
LICENSE
README.md
index.html
index.js
package.json
webpack.config.babel.js

README.md

React Component Boilerplate

A simple boilerplate for React component development.

Features

Usage

  • Setup

    git clone https://github.com/jeremyxgo/react-component-boilerplate.git your-project-name
    cd your-project-name
    npm install
    
    • Updating package name, version, description and author in package.json
    • Updating component name in ./webpack.config.babel.js and related file under ./src to whatever you want.
  • Start dev server(with LiveReload and HMR)

    npm run server
    
    • Open web browser and navigate to http://localhost:3000, now you can see your changes without reloading after you edit the files under ./src
  • Build(for production)

    npm run build
    
  • Build(for development)

    npm run build:dev
    
  • Unit testing

    npm run test
    
  • Real-time unit testing

    npm run test:watch
    
    • Test will run automatically when you edit any file under ./src and ./test
  • Generate coverage report

    npm run coverage
    
    • You can find the coverage report under ./coverage

License

MIT