diff --git a/gulpfile.js b/gulpfile.js index cc9c44577..db71523f2 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' @@ -104,9 +105,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({ @@ -119,7 +117,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 430104607..176621b28 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",