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'
This commit is contained in:
parent
09a1985c25
commit
884615d845
16
gulpfile.js
16
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));
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
Reference in New Issue