You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var Combine = require('stream-combiner')
var es = require('event-stream')
Combine( // connect streams together with `pipe`
process.openStdin(), // open stdin
es.split(), // split stream to break on newlines
es.map(function (data, callback) { // turn this async function into a stream
var repr = inspect(JSON.parse(data)) // render it nicely
callback(null, repr)
}),
process.stdout // pipe it to stdout !
)
写于 2016-10-11
插件
gulp官方推荐gulp-changed
gulp-changed
https://github.com/sindresorhus/gulp-changed
Only pass through changed files
npm install --save-dev gulp-changed
gulp官方推荐gulp-cached
gulp-cached
https://github.com/contra/gulp-cached
in-memory file cache, not for operation on sets of files
gulp官方推荐gulp-remember
gulp-remember
https://github.com/ahaurw01/gulp-remember
pairs nicely with gulp-cached
gulp官方推荐gulp-newer
gulp-newer
https://github.com/tschaub/gulp-newer
npm install gulp-newer --save-dev
pass through newer source files only, supports many:1 source:dest
自动加载插件模块
gulp-load-plugins
http://npm.taobao.org/package/gulp-load-plugins
npm install -–save-dev gulp-load-plugins
压缩图片
gulp-imagemin
http://npm.taobao.org/package/gulp-imagemin
npm install --save-dev gulp-imagemin
添加浏览器前缀到CSS
gulp-autoprefixer
npm install --save-dev gulp-autoprefixer
http://npm.taobao.org/package/gulp-autoprefixer
压缩css文件
css nano
gulp-cssnano
http://npm.taobao.org/package/gulp-cssnano
npm install --save-dev gulp-cssnano
css minify
gulp-minify-css
编译 Sass
gulp-ruby-sass
http://npm.taobao.org/package/gulp-ruby-sass
npm install --save-dev gulp-ruby-sass
压缩JavaScript文件
gulp-uglify
http://npm.taobao.org/package/gulp-uglify
npm install --save-dev gulp-uglify
检查JavaScript文件
gulp-jshint
http://npm.taobao.org/package/gulp-jshint
npm install --save-dev gulp-jshint
合并文件
gulp-concat
http://npm.taobao.org/package/gulp-concat
npm install --save-dev gulp-concat
指定顺序
浏览器重加载
livereload
gulp-livereload
http://npm.taobao.org/package/gulp-livereload
livereload需要浏览器扩展支持
browser-sync
browser-sync
http://npm.taobao.org/package/browser-sync
npm install --save-dev browser-sync
browser-sync
与LiveReload
非常相似,但是它有更多的功能。改变代码时,BrowserSync
会重新加载页面,如果是css文件,则直接添加进css中,页面并不需要再次刷新。在开发单页面应用时尤其高效。BrowserSync
也可以在不同浏览器之间同步点击翻页、表单操作、滚动位置。gulp-usemin
gulp-usemin
npm install --save-dev gulp-usemin
http://npm.taobao.org/package/gulp-usemin
https://github.com/zont/gulp-usemin
获取变动的文件信息
gulp-watch-path
npm install --save-dev gulp-watch-path
http://npm.taobao.org/package/gulp-watch-path
stream-combiner2
stream-combiner2
http://npm.taobao.org/package/stream-combiner2
gulp-sourcemaps
gulp-sourcemaps
http://npm.taobao.org/package/gulp-sourcemaps
The text was updated successfully, but these errors were encountered: