Skip to content

florian-bd/webpack-boilerplate

 
 

Repository files navigation

Webpack boilerplate

Build Status Dependency Status devDependency Status semantic-release

Starter kit for modern web app (React, Bootstrap, jQuery) and bundle logic with Webpack for development (with hot reloading) and for production

Made by Paul Musso

Features

  • Output 2 js files, one for app code and other one for dependencies (jQuery, ...)
  • SourceMaps for JS, JSX and LESS
  • Ressources (fonts and images) lesser than 100Kb are inlined in JS files
  • Files generated by Webpack are injected to index.html
  • 2 configurations
    • Development (npm run start)
    • Production (npm run serve or npm run build)
      • Styles exported to a CSS file
      • CSS and JS files are minimized
      • Source Maps are exported to dedicated files
  • Use ESLint: check JS syntax at packaging time
  • React
  • Bootstrap
  • JQuery
    • Included in JS file for dependencies
    • It is exposed in global scope as jQuery
  • Less (CSS preprocessor)
  • Tests with Karma Jasmine PhantomJS

Getting started

Ensure you have node greater than version 4 (Code contains es6 syntax)

Installation

  1. Get repo with git clone https://github.com/paulmusso/webpack-boilerplate.git

  2. Delete the existing git repository by running rm -rf .git

  3. Run npm install to install the dependencies

Development server (with hot reload)

npm start

Go to http://localhost:8080 and you should see the app running!

Build for production

npm run build

Output files are copied to dist folder

Serve production files

npm run serve

Run tests

npm test

License

This project is licensed under the MIT license

About

Starter kit for modern web app with Webpack

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 87.3%
  • CSS 6.9%
  • Shell 4.0%
  • HTML 1.8%