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
βββ commitlint.config.js # This is the configuration file for commitlint
βββ 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
- Commit conventions with commitlint
It runs linters before committing and prevents errors to go in your repository.
Example with errors
Example after fixing errors