Giter Club home page Giter Club logo

webpack-boilerplate's Introduction

webpack-boilerplate

Webpack Boilerplate

This starter project aims to be more productive when starting a webpack project.

Requirements

This starter project should be working as expected with the following minimal version of:

Dependency Version
Node >= v8.0.0
NPM >= v5.0.0

๐Ÿš€ Quick start

  1. Clone the git repository
# cloning git repository into `my-webpack-starter` folder
git clone https://github.com/Abdessalam98/webpack-boilerplate my-webpack-starter

# install project dependencies
cd my-webpack-starter && npm install
  1. Start Developing

Dev Version

npm run dev

Prod Version

npm run prod
  1. Open browser and start editing files!

Site is running at http://localhost:9000

๐Ÿง What's inside?

.
โ”œโ”€โ”€ node_modules        # This is the directory of the modules (npm packages) for your project
โ”œโ”€โ”€ config              # Config files
|   โ”œโ”€โ”€ index.js
|   โ”œโ”€โ”€ dev.js
|   โ””โ”€โ”€ prod.js
โ”œโ”€โ”€ build               # Webpack configuration files
|   โ”œโ”€โ”€ webpack.common.js
|   โ”œโ”€โ”€ webpack.dev.js
|   โ””โ”€โ”€ webpack.prod.js
โ”œโ”€โ”€ src                 # This is the directory of entry point files related to the front-end of your site
|   โ”œโ”€โ”€ index.js        # This is the entry point file for Webpack
|   โ””โ”€โ”€ assets
|       โ”œโ”€โ”€ fonts
|       โ”œโ”€โ”€ images
|       โ”œโ”€โ”€ javascripts
|       โ””โ”€โ”€ stylesheets
โ”œโ”€โ”€ .gitignore          # This file tells git which files it should not track
โ”œโ”€โ”€ .prettierrc.json    # This is the configuration file for Prettier
โ”œโ”€โ”€ .eslintrc.json      # This is the configuration file for ESLint
โ”œโ”€โ”€ .stylelintrc.json   # This is the configuration file for stylelint
โ”œโ”€โ”€ index.html          # This is the file where Webpack serve content
โ”œโ”€โ”€ package.json        # This file tells npm which packages to install for your project
โ”œโ”€โ”€ README.md
โ””โ”€โ”€ LICENSE

โœจ Features

  • Babel
  • Linting with ESLint and Stylelint
  • Code formatting with Prettier
  • Precommit with husky and lint-staged

๐Ÿ’ฉ When trying to commit bad code

It runs linters before committing and prevents errors to go in your repository.

Example with errors

preview-precommit-errors

Example after fixing errors

preview-precommit-errors-resolved

Author

Abdessalam BENHARIRA

webpack-boilerplate's People

Watchers

James Cloos 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.