Website bolierplate for HTML/CSS/JS/WebFont/CSSSprite.
Requires the following to run:
- node 12.14+
- npm 6.13+
I checked the operation with Windows 10 / MacOS 10.12.
1.Clone the Git repository
git clone https://github.com/okamoai/static-website-boilerplate.git2.Move to project directory
cd static-website-boilerplate3.Install Node.js package
npm install4.Start Development (run build and local server)
npm startBuild source files
| Type | Generator | Path |
|---|---|---|
| HTML | Pug | src/pug |
| CSS | Stylus, PostCSS | src/stylus |
| JavaScript | Webpack, Babel | src/js |
| Image | imagemin | src/img |
| WebFont | postcss-webfont(forked) | src/font |
| Sprite | postcss-lazysprite | src/sprite |
| Other static files | cpx | src/static |
- Development is npm scripts
npm start. Run clean, build, watching and local Server. - Production build is npm scripts
npm run build production. Run clean and minify build.
| File | use type | use package and options |
|---|---|---|
.browserslistrc |
CSS, JavaScript | postcss-preset-env, @babel/preset-env |
postcss.config.js |
CSS, WebFont, Sprite | cssnano, postcss-webfont, postcss-lazysprite |
build/config.js |
JavaScript, Image | Webpack, imagemin plugins (gifsicle, pngquant, jpegtran, svgo) |
MIT © okamoai