Skip to content

A minimal react boilerplate with webpack 5 📦, babel v7 🚀 and SASS support. Linting, pre-commit hooks, snapshot and DOM testing, continuous integration and more already set up. 🎨

License

Notifications You must be signed in to change notification settings

rishichawda/minimal-react-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minimal-react-boilerplate

A minimal react boilerplate with webpack 5, babel v7 and SASS support.

  • Webpack 5 - All the good things from Webpack 5 including faster builds, smaller build sizes and more.

  • Babel 7

  • ESLint ( with prettier config ) - give the configuration a shot and thank me later. 😄

  • Husky - Pre-commit lint check for staged files to ensure 💩-code is never commited.

  • CSS and SASS support.

  • Easy and cleaner imports with babel module resolver.

For example, if you have a directory structure like this:

src
-- components
-- config
---- secret-config.js
-- pages
---- home
------ index.js

You can import secret-config.js in index.js as :

import config from "config/secret-config.js";
  • Environment files - environment variable imports are already configured and added! Just create development.env and production.env ( inside config directory ) with your environment variables and start using them in your app! 🎉

  • Snapshots and DOM testing - Includes DOM testing with Jest and react-testing-library and also includes snapshot test examples with Jest. travis.yml is already included to run the tests on TravisCI.

Usage :

  1. Clone the repository via SSH :
$ git clone [email protected]:rishichawda/minimal-react-boilerplate.git

or HTTPS :

$ git clone https://github.com/rishichawda/minimal-react-boilerplate.git
$ cd minimal-react-boilerplate
$ npm install

Unfamiliar with git?

Simply click here to download the zip. Extract the .zip file and run the following commands inside the directory.

$ npm install
$ npm run start

To start the development server :

$ npm run start

To generate production build :

$ npm run build

About

A minimal react boilerplate with webpack 5 📦, babel v7 🚀 and SASS support. Linting, pre-commit hooks, snapshot and DOM testing, continuous integration and more already set up. 🎨

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published