npm install
npm run dev // build dev locally
npm run devw // build dev locally, and watch for changes
npm run devwo // build dev locally, watch for changes, and open the project in browser
- built-in css-reset-and-normalize for cross-browser compatibility (NEW)
- cache busting (hashing system)
- refactoring codes instantly (uglify or minify)
- chunking and bundling --
- other plugins used for optimization: mini-css-extract-plugin, optimize-css-assets-webpack-plugin, clean-webpack-plugin
- easier settings modification (shown below)
/************************************************
-- WEBPACK CONFIG JS: variables / package imports
************************************************/
const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const OptimizeCssAssetsPlugin = require("optimize-css-assets-webpack-plugin");
const TerserPlugin = require("terser-webpack-plugin");
const {CleanWebpackPlugin} = require("clean-webpack-plugin");
/************************************************
-- 1. ADD YOUR PAGES in commonPages; 2. (optional) : edit arrPages/path in entryJS and entryPug if needed
************************************************/
const commonPages = ['index', 'about'];
const entryJS = {...};
const entryPug = {...}
/************************************************
-- configured rules variables
************************************************/
const rules = {...};
/************************************************
-- DEVELOPMENT & PRODUCTION common config
************************************************/
let config = {...};
Pug is a high-performance template engine heavily influenced by Haml and implemented with JavaScript for Node.js and browsers.
Sass makes CSS fun again. Sass is an extension of CSS, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a plugin for your build system.
The compiler for writing next generation JavaScript. Babel is a tool that helps you write code in the latest version of JavaScript. When your supported environments don't support certain features natively, Babel will help you compile those features down to a supported version.
This combination of css reset and normalize is based on CSS Reset 2.0 (public domain) by Eric Meyer normalize.css 8.0.1 (MIT) by Nicolas Gallagher and Jonathan Neal Bootstrap 4.3.1 Reboot (MIT) by Twitter Inc.
Rules and Reasons Take a look at the source code, it has comments.
Why use it?: Here's an article about Reboot, Resets and Reasoning by Chris Coyier.
usage:
npm install
npm run dev // build dev locally
npm run devw // build dev locally, and watch for changes
npm run devwo // build dev locally, watch for changes, and open the project in browser
- built-in css-reset-and-normalize for cross-browser compatibility (NEW)
- cache busting (hashing system)
- refactoring codes instantly (uglify or minify)
- chunking and bundling --
- other plugins used for optimization: mini-css-extract-plugin, optimize-css-assets-webpack-plugin, clean-webpack-plugin
- easier settings modification (shown below)
/************************************************
-- WEBPACK CONFIG JS: variables / package imports
************************************************/
const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const OptimizeCssAssetsPlugin = require("optimize-css-assets-webpack-plugin");
const TerserPlugin = require("terser-webpack-plugin");
const {CleanWebpackPlugin} = require("clean-webpack-plugin");
/************************************************
-- 1. ADD YOUR PAGES in commonPages; 2. (optional) : edit arrPages/path in entryJS and entryPug if needed
************************************************/
const commonPages = ['index', 'about'];
const entryJS = {...};
const entryPug = {...}
/************************************************
-- configured rules variables
************************************************/
const rules = {...};
/************************************************
-- DEVELOPMENT & PRODUCTION common config
************************************************/
let config = {...};
Pug is a high-performance template engine heavily influenced by Haml and implemented with JavaScript for Node.js and browsers.
Sass makes CSS fun again. Sass is an extension of CSS, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a plugin for your build system.
The compiler for writing next generation JavaScript. Babel is a tool that helps you write code in the latest version of JavaScript. When your supported environments don't support certain features natively, Babel will help you compile those features down to a supported version.
This combination of css reset and normalize is based on CSS Reset 2.0 (public domain) by Eric Meyer normalize.css 8.0.1 (MIT) by Nicolas Gallagher and Jonathan Neal Bootstrap 4.3.1 Reboot (MIT) by Twitter Inc.
Rules and Reasons Take a look at the source code, it has comments.
Why use it?: Here's an article about Reboot, Resets and Reasoning by Chris Coyier.
usage:
<link rel="stylesheet" href="path/to/reset-and-normalize.min.css"> // HTML <link>`
@import "path/to/reset-and-normalize.min.css"; // CSS @import
@import 'path/to/node_modules/css-reset-and-normalize/scss/reset-and-normalize'; // SCSS @import
@require 'path/to/node_modules/css-reset-and-normalize/stylus/reset-and-normalize' // Stylus @require
@import 'path/to/node_modules/css-reset-and-normalize/less/reset-and-normalize'; // LESS @import