This starter project aims to be more productive when starting a webpack project.
This starter project should be working as expected with the following minimal version of:
Dependency | Version |
---|---|
Node | >= v8.0.0 |
NPM | >= v5.0.0 |
- 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
- Start Developing
Dev Version
npm run dev
Prod Version
npm run prod
- Open browser and start editing files!
Site is running at http://localhost:9000
.
โโโ 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
- Babel
- Linting with ESLint and Stylelint
- Code formatting with Prettier
- Precommit with husky and lint-staged
It runs linters before committing and prevents errors to go in your repository.
Example with errors
Example after fixing errors