From bdaa8f8ea97df9a73b8b86652f7c3c0f678ba90e Mon Sep 17 00:00:00 2001 From: Michael Xander Date: Sun, 9 Apr 2017 09:57:54 +0200 Subject: [PATCH] Updated build tooling dependencies and fixed breaking changes --- .stylelintrc | 55 ++++++++++++------------ gulp/config.js | 19 ++++---- gulp/tasks/production/optimize-images.js | 11 ++++- package.json | 51 +++++++++++----------- 4 files changed, 71 insertions(+), 65 deletions(-) diff --git a/.stylelintrc b/.stylelintrc index 2424686..d0519c6 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -1,4 +1,7 @@ { + "plugins": [ + "stylelint-order" + ], "rules": { "block-no-empty": true, "block-opening-brace-newline-after": "always-multi-line", @@ -11,9 +14,32 @@ "declaration-bang-space-after": "never", "declaration-bang-space-before": "always", "declaration-block-no-duplicate-properties": true, - "declaration-block-no-ignored-properties": true, "declaration-block-no-shorthand-property-overrides": true, - "declaration-block-properties-order": [ + "declaration-block-semicolon-newline-after": "always", + "declaration-block-semicolon-newline-before": "never-multi-line", + "declaration-block-semicolon-space-before": "never", + "declaration-block-trailing-semicolon": "always", + "declaration-colon-space-after": "always", + "declaration-colon-space-before": "never", + "declaration-no-important": true, + "font-family-name-quotes": "always-where-recommended", + "function-calc-no-unspaced-operator": true, + "indentation": 2, + "length-zero-no-unit": true, + "max-empty-lines": 2, + "max-nesting-depth": 3, + "media-feature-colon-space-after": "always", + "media-feature-colon-space-before": "never", + "media-feature-name-no-vendor-prefix": true, + "media-feature-range-operator-space-after": "always", + "media-feature-range-operator-space-before": "always", + "no-eol-whitespace": true, + "no-extra-semicolons": true, + "no-invalid-double-slash-comments": true, + "no-unknown-animations": true, + #"no-unsupported-browser-features": true, Can be occasionally enabled to debug. Checks code against "Can I use" database. + "number-leading-zero": "never", + "order/properties-order": [ "content", "display", "vertical-align", @@ -135,31 +161,6 @@ "quotes", "speak" ], - "declaration-block-semicolon-newline-after": "always", - "declaration-block-semicolon-newline-before": "never-multi-line", - "declaration-block-semicolon-space-before": "never", - "declaration-block-trailing-semicolon": "always", - "declaration-colon-space-after": "always", - "declaration-colon-space-before": "never", - "declaration-no-important": true, - "font-family-name-quotes": "always-where-recommended", - "function-calc-no-unspaced-operator": true, - "indentation": 2, - "length-zero-no-unit": true, - "max-empty-lines": 2, - "max-nesting-depth": 3, - "media-feature-colon-space-after": "always", - "media-feature-colon-space-before": "never", - "media-feature-name-no-vendor-prefix": true, - "media-feature-no-missing-punctuation": true, - "media-feature-range-operator-space-after": "always", - "media-feature-range-operator-space-before": "always", - "no-eol-whitespace": true, - "no-extra-semicolons": true, - "no-invalid-double-slash-comments": true, - "no-unknown-animations": true, - #"no-unsupported-browser-features": true, Can be occasionally enabled to debug. Checks code against "Can I use" database. - "number-leading-zero": "never", "property-case": "lower", "property-no-vendor-prefix": true, "selector-max-compound-selectors": 3, diff --git a/gulp/config.js b/gulp/config.js index 161c1e4..8e233f1 100644 --- a/gulp/config.js +++ b/gulp/config.js @@ -78,7 +78,7 @@ module.exports = { options: { stylelint: {}, // Using .stylelintrc reporter: { - clearMessages: true + clearReportedMessages: true } } }, @@ -246,16 +246,13 @@ module.exports = { images: { src: developmentAssets + '/images/**/*.{jpg,jpeg,png,gif,svg}', dest: productionAssets + '/images/', - // @TODO Options needs to be adjusted on update to imagemin@3.x.x - options: { - optimizationLevel: 3, - progessive: true, - interlaced: true, - verbose: false, - svgoPlugins: [{ - removeDesc: true - }] - } + imageminPluginOptions: { + gifsicle: { interlaced: true }, + jpegtran: { progressive: true }, + optipng: { optimizationLevel: 3 }, + svgo: { plugins: [{ removeDesc: true }] } + }, + imageminOptions: { verbose: false } }, html: { development: { diff --git a/gulp/tasks/production/optimize-images.js b/gulp/tasks/production/optimize-images.js index ba29ae6..b7e0631 100644 --- a/gulp/tasks/production/optimize-images.js +++ b/gulp/tasks/production/optimize-images.js @@ -6,7 +6,14 @@ var config = require('../../config').optimize.images; // Copy and minimize images gulp.task('optimize:images', function() { return gulp.src(config.src) - .pipe(imagemin(config.options)) + .pipe(imagemin([ + imagemin.gifsicle(config.imageminPluginOptions.gifsicle), + imagemin.jpegtran(config.imageminPluginOptions.jpegtran), + imagemin.optipng(config.imageminPluginOptions.optipng), + imagemin.svgo(config.imageminPluginOptions.svgo) + ], + config.imageminOptions) + ) .pipe(gulp.dest(config.dest)) .pipe(size()); -}); +}); \ No newline at end of file diff --git a/package.json b/package.json index 15e1b36..dc2ed53 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gulp-jekyll", - "version": "0.0.3", + "version": "0.0.4", "description": "The build process for gulp-jekyll", "author": "Michael Xander", "repository": "michaelx/gulp-jekyll", @@ -16,48 +16,49 @@ ] }, "devDependencies": { - "autoprefixer": "^6.3.6", - "browser-sync": "^2.13.0", - "browserify": "^13.0.1", - "browserify-shim": "^3.8.12", + "autoprefixer": "^6.7.7", + "browser-sync": "^2.18.8", + "browserify": "^13.3.0", + "browserify-shim": "^3.8.14", "css-mqpacker": "^5.0.1", - "del": "^2.2.1", + "del": "^2.2.2", "gulp": "^3.9.1", "gulp-base64": "^0.1.3", - "gulp-changed": "^1.3.0", + "gulp-changed": "^2.0.0", "gulp-concat": "^2.6.0", "gulp-cssnano": "^2.1.2", "gulp-filter": "^3.0.1", "gulp-gzip": "^1.4.0", "gulp-htmlmin": "^2.0.0", - "gulp-image-resize": "^0.10.0", - "gulp-imagemin": "^2.3.0", - "gulp-jshint": "^2.0.1", - "gulp-jsonlint": "^1.1.2", + "gulp-image-resize": "^0.12.0", + "gulp-imagemin": "^3.2.0", + "gulp-jshint": "^2.0.4", + "gulp-jsonlint": "^1.2.0", "gulp-jsonminify": "^1.0.0", - "gulp-notify": "^2.2.0", + "gulp-notify": "^3.0.0", "gulp-plumber": "^1.1.0", - "gulp-postcss": "^6.1.1", - "gulp-pretty-data": "^0.1.1", + "gulp-postcss": "^6.4.0", + "gulp-pretty-data": "^0.2.0", "gulp-rename": "^1.2.2", - "gulp-rev": "^7.1.0", + "gulp-rev": "^7.1.2", "gulp-rev-collector": "^1.0.4", - "gulp-rsync": "0.0.6", + "gulp-rsync": "0.0.7", "gulp-shell": "^0.5.2", "gulp-size": "^2.1.0", - "gulp-sourcemaps": "^1.6.0", - "gulp-uglify": "^1.5.4", + "gulp-sourcemaps": "^2.5.0", + "gulp-uglify": "^2.1.2", "gulp-uncss": "^1.0.6", - "gulp-util": "^3.0.7", + "gulp-util": "^3.0.8", "gulp-webp": "^2.3.0", - "gulp.spritesmith": "^6.2.1", - "jshint-stylish": "^2.2.0", - "postcss-reporter": "^1.3.3", + "gulp.spritesmith": "^6.4.0", + "jshint-stylish": "^2.2.1", + "postcss-reporter": "^3.0.0", "precss": "^1.4.0", - "pretty-hrtime": "^1.0.2", - "require-dir": "^0.3.0", + "pretty-hrtime": "^1.0.3", + "require-dir": "^0.3.1", "run-sequence": "^1.2.1", - "stylelint": "^6.7.1", + "stylelint": "^7.9.0", + "stylelint-order": "^0.4.3", "vinyl-source-stream": "^1.1.0", "watchify": "^3.7.0" }