Code Monkey home page Code Monkey logo

react-webpack-boilerplate's Introduction

ES6 React boilerplate using Webpack

Travis PRs Welcome

Simple and optimized React boilerplate. It includes:

  • React 16.4.0
  • ECMAScript 6 and JSX support
  • React Router v4
  • Component testing using Enzyme and Jest
  • Code Coverage
  • Latest Webpack (v.4.15.1) and Webpack Dev Server (v.3.1.4) with Scope Hoisting enabled
  • Hot Module Replacement using react-hot-loader
  • ES6 linting with continuous linting on file change
  • SASS support
  • Separate CSS stylesheets generation
  • Automatic HTML generation
  • Production Config
  • Custom Babel Preset with Decorators, Class Properties, Rest/Spread operator support
  • Export Separate Vendor Files
  • Redux

Starting the dev server

Make sure you have the latest Stable or LTS version of Node.js installed.

  1. git clone https://github.com/KleoPetroff/react-webpack-boilerplate.git
  2. Run npm install or yarn install
  3. Start the dev server using npm start
  4. Open http://localhost:8080

Available Commands

  • npm start - start the dev server
  • npm clean - delete the dist folder
  • npm run production - create a production ready build in dist folder
  • npm run lint - execute an eslint check
  • npm test - run all tests
  • npm run test:watch - run all tests in watch mode
  • npm run coverage - generate code coverage report in the coverage folder

Vendor Exporting

You can export specific vendors in separate files and load them. All vendors should be included in app/vendors and will be exported in a vendors folder under dist. The main idea is to serve independent JavaScript and CSS libraries, though currently all file formats are supported.

! Don't forget to add the vendors in app/index.html and build/index.html.

Code Coverage

The project is using the Jest Code Coverage tool. The reports are generated by running npm run coverage. All configurations are located in package.json, inside the jest object.

The coverage report consists of an HTML reporter, which can be viewed in the browser and some helper coverage files like the coverage json and xml file.

Production code

Run npm run production. The production-ready code will be located under dist folder.

Licence

react-webpack-boilerplate is available under MIT.

react-webpack-boilerplate's People

Contributors

ensaphelon avatar greenkeeper[bot] avatar greenkeeperio-bot avatar kleopetroff avatar palashmon avatar prudhviraj5 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.