Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Commit

Permalink
Merge pull request #824 from jmbarlow/gulp-clean-css
Browse files Browse the repository at this point in the history
Switch to gulp-clean-css from deprecated gulp-minify-css
  • Loading branch information
olefredrik authored Sep 4, 2016
2 parents e2b0c98 + 94ae845 commit 07bbfc5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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({
Expand All @@ -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'}));
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit 07bbfc5

Please sign in to comment.