From 48b22fe4b2f862a9930d8617881f0668c4536ea4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Figueiredo?= Date: Thu, 30 Mar 2017 11:58:42 +0200 Subject: [PATCH] Adds cssnano to styles build. --- gulp/tasks/styles.js | 1 + package.json | 1 + 2 files changed, 2 insertions(+) diff --git a/gulp/tasks/styles.js b/gulp/tasks/styles.js index 7aca934..30eaa19 100644 --- a/gulp/tasks/styles.js +++ b/gulp/tasks/styles.js @@ -20,6 +20,7 @@ module.exports = (gulp, $, config) => { })) .pipe($.autoprefixer({ browsers: ['last 2 versions', 'ie 9'] })) .pipe($.if(!config.isProd, $.sourcemaps.write({ includeContent: true }))) + .pipe($.if(config.isProd, $.cssnano())) .pipe($.if(config.isProd, $.revReplace({ manifest: fs.existsSync(manifestDestPath) && gulp.src(manifestDestPath), }))) diff --git a/package.json b/package.json index 28fb4f5..7b369e0 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "gulp-autoprefixer": "^3.1.1", "gulp-changed": "^2.0.0", "gulp-concat": "^2.6.1", + "gulp-cssnano": "^2.1.2", "gulp-data": "^1.2.1", "gulp-eslint": "^3.0.1", "gulp-if": "^2.0.2",