Coder Social home page Coder Social logo

ferjssilva / webpack-4-react-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
45.0 6.0 27.0 163 KB

A simple Webpack 4 React Boilerplate

License: MIT License

HTML 3.66% JavaScript 86.33% CSS 8.11% Sass 1.90%
react webpack boilerplate webpack-dev-server jest minimal

webpack-4-react-boilerplate's Introduction

webpack 4 React boilerplate GitHub license

A simple and complete Webpack 4 React Boilerplate.

  • Ready to start React App ⚡
  • Image loader configured 📷
  • SASS and CSS loaders configured 🎨
  • Hot reload configured ☀️
  • Unit test tools configured 🔬
  • Production build optimized 📈

Motivation

The purpose of this boilerplate is help to create new apps and projects. It's easy to customize and if you need help to understand you can check the commits for a step-by-step guide.

It´s a solid base which will help to understand webpack core concepts.

Getting Started

To start you can simply download the boilerplate and unzip it into your working directory. You can also clone if you want to contribute.

Prerequisites

  • Node.js v8 or above

You can check your node version using the command:

node --version

Installing

Install dependencies and start using yarn:

yarn install
yarn start

Or via npm:

npm install
npm start

Testing

You can run your tests using:

yarn test

It´s possible to generate the code coverage of your code. Jest will generate a HTML file with all information from your tests. To do this run the command:

yarn test:coverage

Production build

You can generate an optimized distribution bundle. To do this run the command:

yarn build

It´s possible to check the size and content of your bundled file. To do this run the command:

yarn analyze

That´s it! Remember to change the project information in package.json, README and LICENSE if necessary. 🎓

Give the project a star if you liked it. Happy Hacking! 😎 ⭐

Built With

  • webpack - Static module bundler
  • React - JavaScript library for building user interfaces
  • Babel - EcmaScript Transpiler
  • Yarn - Dependency Management
  • Jest - JavaScript Testing
  • Enzyme - Component tests for React

Contributing

Suggestions or pull requests are welcome.

For major changes, please open an issue first to discuss what you would like to change.

Versions

  • v1.0 - A complete webpack 4 configuration
  • v1.1 - Production build optimization

Click here to see or download the project in a specific tag.

License

This project is licensed under the MIT Licensed - see the LICENSE file for details

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.