From 276de5f924a6c1e523f7fb522065aea96f1117b6 Mon Sep 17 00:00:00 2001 From: James Barlow Date: Mon, 23 May 2016 00:20:24 +0100 Subject: [PATCH 1/3] Update package.json --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index bef6dd9d5..0b06e7444 100644 --- a/package.json +++ b/package.json @@ -24,17 +24,17 @@ "devDependencies": { "autoprefixer": "^6.1.0", "babel-core": "^6.5.2", - "babel-preset-es2015": "^6.5.0", - "babel-plugin-transform-es2015-modules-commonjs": "^6.3.13", "babel-plugin-transform-es2015-arrow-functions": "^6.3.13", "babel-plugin-transform-es2015-block-scoped-functions": "^6.3.13", "babel-plugin-transform-es2015-block-scoping": "^6.4.0", "babel-plugin-transform-es2015-classes": "^6.3.15", "babel-plugin-transform-es2015-destructuring": "^6.3.15", + "babel-plugin-transform-es2015-modules-commonjs": "^6.3.13", "babel-plugin-transform-es2015-parameters": "^6.3.26", "babel-plugin-transform-es2015-shorthand-properties": "^6.5.0", "babel-plugin-transform-es2015-spread": "^6.4.0", "babel-plugin-transform-es2015-template-literals": "^6.3.13", + "babel-preset-es2015": "^6.5.0", "babel-register": "^6.5.2", "bower": "~1.6.4", "browser-sync": "^2.10.0", @@ -44,12 +44,12 @@ "gulp": "^3.9.0", "gulp-autoprefixer": "^3.1.0", "gulp-babel": "^6.1.2", + "gulp-clean-css": "^2.0.7", "gulp-concat": "^2.6.0", "gulp-flatten": "^0.2.0", "gulp-if": "^2.0.0", "gulp-jshint": "^2.0.0", "gulp-load-plugins": "^1.1.0", - "gulp-minify-css": "^1.2.2", "gulp-notify": "^2.2.0", "gulp-phpcbf": "latest", "gulp-phpcs": "^1.0.0", From 0a8b5a5391a27c0202e88c7d202dc6185b1b987b Mon Sep 17 00:00:00 2001 From: James Barlow Date: Mon, 23 May 2016 00:21:01 +0100 Subject: [PATCH 2/3] Update gulpfile.js --- gulpfile.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 205a1271c..d76b2788b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -10,6 +10,7 @@ var sequence = require('run-sequence'); var colors = require('colors'); var dateFormat = require('dateformat'); var del = require('del'); +var cleanCSS = require('gulp-clean-css'); // Enter URL of your local server here // Example: 'http://localwebsite.dev' @@ -100,9 +101,6 @@ gulp.task('browser-sync', ['build'], function() { // Compile Sass into CSS // In production, the CSS is compressed gulp.task('sass', function() { - // Minify CSS if run with --production flag - var minifycss = $.if(isProduction, $.minifyCss()); - return gulp.src('assets/scss/foundation.scss') .pipe($.sourcemaps.init()) .pipe($.sass({ @@ -115,7 +113,8 @@ gulp.task('sass', function() { .pipe($.autoprefixer({ browsers: COMPATIBILITY })) - .pipe(minifycss) + // Minify CSS if run with --production flag + .pipe($.if(isProduction, cleanCSS())) .pipe($.if(!isProduction, $.sourcemaps.write('.'))) .pipe(gulp.dest('assets/stylesheets')) .pipe(browserSync.stream({match: '**/*.css'})); From 9d4ac0d1f3e33a89c439d226d7dcd7a32dac538b Mon Sep 17 00:00:00 2001 From: James Barlow Date: Mon, 23 May 2016 01:04:58 +0100 Subject: [PATCH 3/3] Update gulp config to use gulp-clean-css. [gulp-minify-css depracated] --- gulpfile.js | 7 +++---- package.json | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 205a1271c..d76b2788b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -10,6 +10,7 @@ var sequence = require('run-sequence'); var colors = require('colors'); var dateFormat = require('dateformat'); var del = require('del'); +var cleanCSS = require('gulp-clean-css'); // Enter URL of your local server here // Example: 'http://localwebsite.dev' @@ -100,9 +101,6 @@ gulp.task('browser-sync', ['build'], function() { // Compile Sass into CSS // In production, the CSS is compressed gulp.task('sass', function() { - // Minify CSS if run with --production flag - var minifycss = $.if(isProduction, $.minifyCss()); - return gulp.src('assets/scss/foundation.scss') .pipe($.sourcemaps.init()) .pipe($.sass({ @@ -115,7 +113,8 @@ gulp.task('sass', function() { .pipe($.autoprefixer({ browsers: COMPATIBILITY })) - .pipe(minifycss) + // Minify CSS if run with --production flag + .pipe($.if(isProduction, cleanCSS())) .pipe($.if(!isProduction, $.sourcemaps.write('.'))) .pipe(gulp.dest('assets/stylesheets')) .pipe(browserSync.stream({match: '**/*.css'})); diff --git a/package.json b/package.json index bef6dd9d5..0b06e7444 100644 --- a/package.json +++ b/package.json @@ -24,17 +24,17 @@ "devDependencies": { "autoprefixer": "^6.1.0", "babel-core": "^6.5.2", - "babel-preset-es2015": "^6.5.0", - "babel-plugin-transform-es2015-modules-commonjs": "^6.3.13", "babel-plugin-transform-es2015-arrow-functions": "^6.3.13", "babel-plugin-transform-es2015-block-scoped-functions": "^6.3.13", "babel-plugin-transform-es2015-block-scoping": "^6.4.0", "babel-plugin-transform-es2015-classes": "^6.3.15", "babel-plugin-transform-es2015-destructuring": "^6.3.15", + "babel-plugin-transform-es2015-modules-commonjs": "^6.3.13", "babel-plugin-transform-es2015-parameters": "^6.3.26", "babel-plugin-transform-es2015-shorthand-properties": "^6.5.0", "babel-plugin-transform-es2015-spread": "^6.4.0", "babel-plugin-transform-es2015-template-literals": "^6.3.13", + "babel-preset-es2015": "^6.5.0", "babel-register": "^6.5.2", "bower": "~1.6.4", "browser-sync": "^2.10.0", @@ -44,12 +44,12 @@ "gulp": "^3.9.0", "gulp-autoprefixer": "^3.1.0", "gulp-babel": "^6.1.2", + "gulp-clean-css": "^2.0.7", "gulp-concat": "^2.6.0", "gulp-flatten": "^0.2.0", "gulp-if": "^2.0.0", "gulp-jshint": "^2.0.0", "gulp-load-plugins": "^1.1.0", - "gulp-minify-css": "^1.2.2", "gulp-notify": "^2.2.0", "gulp-phpcbf": "latest", "gulp-phpcs": "^1.0.0",