Gulp 简诉

gulp API


gulp.src(globs[, options])
gulp.dest(path[, options])
gulp.task(name[, deps], fn) --异步任务支持
gulp.watch(glob [, opts], tasks) 或 gulp.watch(glob [, opts, cb])

gulp plugins


| 插件名 | 描述 | 用法 |
|: -------------|:-------------|:-----|
| gulp-less | |var less = require('gulp-less') |
| gulp-sass | |var sess = require('gulp-sess') |
|gulp-minify-css||var minifyCss = require('gulp-minify-css') |
| gulp-uglify | js文件压缩 |var uglify = require('gulp-uglify') |
|gulp-jshint| js文件检查 |var jshint = require('gulp-jshint')|
|gulp-minify-html||var minifyHtml = require('gulp-minify-html')|
| gulp-concat | |var concat = require('gulp-concat') |
| gulp-if | |var gulpif = require('gulp-if') |
| gulp-watch | |var watch = require('gulp-watch') |
| gulp-git | |var git = require('gulp-git') |
|gulp-clean||var clean = require('gulp-clean')|
|gulp-rename| |var rename = require('gulp-rename')|
|gulp-template||var template = require('gulp-template')|
|gulp-markdown||var markdown = require('gulp-markdown')|
|gulp-load-plugins|自动加载插件
gulp开头的插件加载
本身不加载
option可以看源码34行|var plugins = require('gulp-load-plugins')([option])|

注:以上默认安装方法npm install xx插件名xx --save-dev

node plugins


| 插件名 | 描述 | 用法 |
|: -------------|:-------------|:-----|
| q | |var Q = require('q') |
| minimist |解析参数选项 |var minimist = require('minimist') |
| del | |var del = require('del') |

注:以上默认安装方法npm install xx插件名xx --save-dev

你可能感兴趣的:(Gulp 简诉)