create-webpack-template
v0.1.3
Published
Easy create webpack template
Readme
create-webpack-template
This is a cli with which you can easily generate a webpack v4 config for static sites.
Getting started
npx create-webpack-template
or
npm install create-webpack-template -g && create-webpack-template
After installation, enter the name of your project and select the technologies that you want to use.
After you select everything you need, create-webpack-template will create a directory with the name of your project and place the following files there (depends on your choice).
Example of the structure of your project after creation:
.
├── src <- Working directory
│ ├── assets
│ │ ├── fonts
│ │ └── images
│ │ └── bg.png
│ ├── markup
│ │ ├── templates
│ │ │ └── content.pug
│ │ └── views
│ │ └── index.pug
│ ├── scripts
│ │ └── app.js
│ └── styles
│ ├── normalize.sass
│ └── styles.sass
├── public <- Build directory
├── node_modules
├── webpack.common.js
├── webpack.dev.js
├── package.json
├── package-lock.json
├── webpack.prod.js
└── .gitignoreRun npm run start for development mode or npm run build for production mode.
Capabilities
From cli
CSS capabilities:
- Sass
- Scss
- Less
- Pure CSS
CSS Utils:
- reset.css (sass/scss/less)
- normalize.css (sass/scss/less)
HTML capabilities:
- Pug
- Pure HTML
Webpack technologies used
Loaders:
- file-loader
- css-loader
- html-loader
- style-loader
Plugins:
- html-webpack-plugin
- clean-webpack-plugin
- terser-webpack-plugin
- mini-css-extract-plugin
- optimize-css-assets-webpack-plugin
