Modified from gulp-start
- Install Node.js
- Install Gulp CLI
npm install gulp-cli -g
- Run
npm install
in project directory
gulp
run all tasks to build dist foldergulp clean
removes dist foldergulp cb
removes dist folder and then builds the projectgulp convertFonts
convert ttf fonts to other formats
Compiles SCSS to a minified autoprefixed CSS
Minifies and uglifies JS files into bundle.js. node_modules path are included so you can use them with import like this:
import 'bootstrap/js/dist/dropdown.js';
For covertation fonts into the web formats put your ttf fonts in the src/assets/fonts/ directory and then run gulp convertFonts. It will be converted into woff2, woff and eot formats in the same directory.
Changes imgs src paths from the htmls in the src folder to the paths in the dist.
Optimizes PNG, SVG and JPG images