常用插件
- gulp-htmlmin 用来压缩
HTML
- gulp-imagemin 除了能压缩常见的图片格式,还能压缩
SVG
- gulp-clean-css 压缩 CSS
- gulp-uglify 专业压缩 Javascript
- gulp-concat 合并文件
gulp-order 指定合并顺序
gulp-autoprefixer 给 CSS 增加前缀。解决某些CSS属性不是标准属性,有各种浏览器前缀的情况
- gulp-rename 修改文件名称
- gulp-util 最基础的工具
一些其他进阶插件
gulp-clean 删除文件或者文件夹
gulp-rev hash 文件名
- gulp-rev-replace Rewrite occurences of filenames which have been renamed
- gulp-rev-css-urlOverride URLs in CSS files with the revved ones
- gulp-rev-outdated Old static asset revision files filter
- gulp-rev-collector Static asset revision data collector
- rev-del Delete old unused assets
- gulp-rev-delete-original Delete original files after rev
- gulp-rev-loader Use rev-manifest with webpack
gulp-rev-format Provide hash formatting options for static assets (prefix, suffix, last-extension)
gulp-connect 本地服务
- gulp-livereload 自动加载
- gulp-flatten 移动文件
- gulp-bable bable es6编译