Hi There
I'm working on a project which I'm using Gulp . All was Okay before i used Autoprefixer Plugin and Watch Command . Now when I run gulp at the terminal. My windows 10 is off without any Error message .
gulpfile.js code
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"]);
Package.json Code
"devDependencies": {
"gulp-autoprefixer": "^4.0.0",
"gulp-image": "^3.0.0",
"gulp-imagemin": "~3.3.0",
"gulp-plumber": "^1.1.0"
}
Any Help Please ?
Thanks In Advance
The problem was a performance issue
My windows was V 10 and Ram was 4
The solution that worked for me was exchange the window version from 10 to 7 ultimate and it works well
Another good solution that change Ram with 8 or higher
But I preferred the first one as I wasn't comfortable with windows 10 performance :)