diff --git a/package.json b/package.json index 1ea9cdf..a9f6f83 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,6 @@ "gulp-cheerio": "^0.6.3", "gulp-concat": "^2.6.1", "gulp-consolidate": "^0.2.0", - "gulp-cssnano": "^2.1.3", "gulp-eslint": "^4.0.2", "gulp-gh-pages": "^0.5.4", "gulp-load-plugins": "^1.5.0", diff --git a/tasks/styles.js b/tasks/styles.js index af81c27..14fabab 100644 --- a/tasks/styles.js +++ b/tasks/styles.js @@ -46,9 +46,11 @@ const stylesBuild = () => { .pipe($.postcss([ autoprefixer({ grid: true }), require('cssnano')({ - preset: ['default', { - reduceIdents: false, - }], + reduceIdents: { + keyframes: false, + gridTemplate: false, + counter: false, + }, }), ])) .pipe($.rename((path) => { diff --git a/tasks/vendors.js b/tasks/vendors.js index 6b7d5db..f5dd439 100644 --- a/tasks/vendors.js +++ b/tasks/vendors.js @@ -11,7 +11,15 @@ const cssVendors = (done) => { if (config.vendors.css.length > 0) { return gulp.src(config.vendors.css, {cwd: config.project}) .pipe($.concat('vendors.min.css')) - .pipe($.cssnano()) + .pipe($.postcss([ + require('cssnano')({ + reduceIdents: { + keyframes: false, + gridTemplate: false, + counter: false, + }, + }), + ])) .pipe($.size({title: 'CSS VENDORS', showFiles: true})) .pipe(gulp.dest(`${config.dest}css`, {cwd: config.project})); } diff --git a/yarn.lock b/yarn.lock index 203861c..ed35fb2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2221,7 +2221,7 @@ css@2.X, css@^2.2.1: source-map-resolve "^0.5.1" urix "^0.1.0" -cssnano@^3.0.0, cssnano@^3.10.0: +cssnano@^3.10.0: version "3.10.0" resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-3.10.0.tgz#4f38f6cea2b9b17fa01490f23f1dc68ea65c1c38" dependencies: @@ -3783,16 +3783,6 @@ gulp-consolidate@^0.2.0: consolidate "~0.14.0" map-stream "0.0.4" -gulp-cssnano@^2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/gulp-cssnano/-/gulp-cssnano-2.1.3.tgz#02007e2817af09b3688482b430ad7db807aebf72" - dependencies: - buffer-from "^1.0.0" - cssnano "^3.0.0" - object-assign "^4.0.1" - plugin-error "^1.0.1" - vinyl-sourcemaps-apply "^0.2.1" - gulp-eslint@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/gulp-eslint/-/gulp-eslint-4.0.2.tgz#18a2a6768e4404cbf3e203239cb57474168fa606"