From 884615d84597e99793562107b2d282403f30c661 Mon Sep 17 00:00:00 2001 From: IanDelMar <42134098+IanDelMar@users.noreply.github.com> Date: Tue, 14 Apr 2020 09:53:33 +0200 Subject: [PATCH] Remove gulp-rimraf and gulp-ignore * Removes the deprecated 'gulp-rimraf' * Replaces 'gulp-rimraf' by 'del' in task 'cleancss' * Removes 'gulp-ignore' which was only used in task 'cleancss' --- gulpfile.js | 16 +++++----------- package-lock.json | 29 ----------------------------- package.json | 2 -- 3 files changed, 5 insertions(+), 42 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 6cb531f..5c4c28c 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -9,8 +9,6 @@ var rename = require('gulp-rename'); var concat = require('gulp-concat'); var uglify = require('gulp-uglify'); var imagemin = require('gulp-imagemin'); -var ignore = require('gulp-ignore'); -var rimraf = require('gulp-rimraf'); var sourcemaps = require('gulp-sourcemaps'); var browserSync = require('browser-sync').create(); var del = require('del'); @@ -112,11 +110,11 @@ gulp.task('minifycss', function () { .pipe(touch()); }); +/** + * Delete minified CSS files and their maps + */ gulp.task('cleancss', function () { - return gulp - .src(`${paths.css}/*.min.css`, { read: false }) // Much faster - .pipe(ignore('theme.css')) - .pipe(rimraf()); + return del(paths.css + '/*.min.css*'); }); gulp.task('styles', function (callback) { @@ -149,11 +147,7 @@ gulp.task('scripts', function () { ]; gulp .src(scripts, { allowEmpty: true }) - .pipe(babel( - { - presets: ['@babel/preset-env'] - } - )) + .pipe(babel({ presets: ['@babel/preset-env'] })) .pipe(concat('theme.min.js')) .pipe(uglify()) .pipe(gulp.dest(paths.js)); diff --git a/package-lock.json b/package-lock.json index 3b28e65..1948c03 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4524,16 +4524,6 @@ "vinyl": "^2.0.0" } }, - "gulp-ignore": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/gulp-ignore/-/gulp-ignore-2.0.2.tgz", - "integrity": "sha1-XC6ioKRALgq0orzRLv2SlTRNePI=", - "dev": true, - "requires": { - "gulp-match": "^1.0.3", - "through2": "^2.0.1" - } - }, "gulp-imagemin": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/gulp-imagemin/-/gulp-imagemin-5.0.3.tgz", @@ -4553,15 +4543,6 @@ "through2-concurrent": "^2.0.0" } }, - "gulp-match": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/gulp-match/-/gulp-match-1.1.0.tgz", - "integrity": "sha512-DlyVxa1Gj24DitY2OjEsS+X6tDpretuxD6wTfhXE/Rw2hweqc1f6D/XtsJmoiCwLWfXgR87W9ozEityPCVzGtQ==", - "dev": true, - "requires": { - "minimatch": "^3.0.3" - } - }, "gulp-plumber": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/gulp-plumber/-/gulp-plumber-1.2.1.tgz", @@ -4681,16 +4662,6 @@ "replacestream": "^4.0.0" } }, - "gulp-rimraf": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/gulp-rimraf/-/gulp-rimraf-0.2.2.tgz", - "integrity": "sha512-36X2sfj2d++avb6TUpL9SQIqGR8Wl/NNBVw74ZbXZJ/MGWAmz6aPe/msuyVyUSZPn1RYlctSLV9W5uzPTMk+kw==", - "dev": true, - "requires": { - "rimraf": "^2.6.2", - "through2": "^2.0.3" - } - }, "gulp-sass": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/gulp-sass/-/gulp-sass-4.0.2.tgz", diff --git a/package.json b/package.json index 38661fb..68f4488 100644 --- a/package.json +++ b/package.json @@ -39,13 +39,11 @@ "gulp-babel": "^8.0.0", "gulp-clean-css": "^4.3.0", "gulp-concat": "^2.6.1", - "gulp-ignore": "^2.0.2", "gulp-imagemin": "^5.0.3", "gulp-plumber": "^1.2.1", "gulp-postcss": "^8.0.0", "gulp-rename": "^1.4.0", "gulp-replace": "^1.0.0", - "gulp-rimraf": "^0.2.2", "gulp-sass": "^4.0.2", "gulp-sourcemaps": "^2.6.5", "gulp-touch-fd": "^2.0.0",