我正在做一个我正在使用的项目
吞咽
自动刷新器
插件和
命令现在当我跑步的时候
吞咽
错误
var gulp = require("gulp"),
image_minify = require("gulp-image"),
plumber = require("gulp-plumber"),
autoprefixer = require("gulp-autoprefixer");
/* Image Minify */
gulp.task("imageMinify", function() {
gulp.src("assets/images/**/*")
.pipe(plumber())
.pipe(image_minify())
.pipe(gulp.dest("assets/images/mini"));
});
/* Css Autoprefixer */
gulp.task("prefix", function() {
gulp.src("assets/css/*.css")
.pipe(plumber())
.pipe(autoprefixer({ browsers: ["last 10 versions"] }))
.pipe(gulp.dest("assets/style.css"));
});
/* Watch Function (watch the src and make action) */
gulp.task("watch", function() {
gulp.watch("assets/images/**/*", ["imageMinify"]);
gulp.watch("assets/css/*.css", ["prefix"]);
});
/* Default Function */
gulp.task("default", ["watch", "imageMinify", "prefix"]);
包裹json代码
"devDependencies": {
"gulp-autoprefixer": "^4.0.0",
"gulp-image": "^3.0.0",
"gulp-imagemin": "~3.3.0",
"gulp-plumber": "^1.1.0"
}
提前感谢