From f86fd644e13165c8abb31f533b8e834bcf1e014b Mon Sep 17 00:00:00 2001 From: Aaron Jorbin Date: Wed, 8 Jul 2015 19:53:22 +0000 Subject: [PATCH] Remove grunt-autoprefixer in favor of grunt-postcss with autoprefixer grunt-autoprefixer was deprecated - https://github.com/nDmitry/grunt-autoprefixer/commit/e020f878d5fe1a3f9f15bc7533b31c12ffa74799 None of the autoprefixer tasks should have been called directly, so they are now removed. `grunt precommit` and `grunt build` still work exactly as they should. This change doesn't affect the output of our builds. An NPM install is required after you have updated after this change. See #31700 Props netweb git-svn-id: https://develop.svn.wordpress.org/trunk@33129 602fd350-edb4-49c9-b593-d223f7449a82 --- Gruntfile.js | 15 ++++++++++----- package.json | 3 ++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index c592bb0913..f2a0c0cd0a 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -3,6 +3,7 @@ module.exports = function(grunt) { var path = require('path'), SOURCE_DIR = 'src/', BUILD_DIR = 'build/', + autoprefixer = require('autoprefixer-core'), mediaConfig = {}, mediaBuilds = ['audiovideo', 'grid', 'models', 'views']; @@ -19,10 +20,14 @@ module.exports = function(grunt) { // Project configuration. grunt.initConfig({ - autoprefixer: { + postcss: { options: { - browsers: ['Android >= 2.1', 'Chrome >= 21', 'Explorer >= 7', 'Firefox >= 17', 'Opera >= 12.1', 'Safari >= 6.0'], - cascade: false + processors: [ + autoprefixer({ + browsers: ['Android >= 2.1', 'Chrome >= 21', 'Explorer >= 7', 'Firefox >= 17', 'Opera >= 12.1', 'Safari >= 6.0'], + cascade: false + }) + ] }, core: { expand: true, @@ -577,7 +582,7 @@ module.exports = function(grunt) { grunt.registerTask('rtl', ['rtlcss:core', 'rtlcss:colors']); // Color schemes task. - grunt.registerTask('colors', ['sass:colors', 'autoprefixer:colors']); + grunt.registerTask('colors', ['sass:colors', 'postcss:colors']); // JSHint task. grunt.registerTask( 'jshint:corejs', [ @@ -606,7 +611,7 @@ module.exports = function(grunt) { } ); grunt.registerTask( 'precommit', 'Runs front-end dev/test tasks in preparation for a commit.', [ - 'autoprefixer:core', + 'postcss:core', 'imagemin:core', 'browserify', 'jshint:corejs', diff --git a/package.json b/package.json index 9aa3a89838..711d37556c 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,8 @@ "author": "The WordPress Contributors", "license": "GPL-2.0+", "devDependencies": { + "autoprefixer-core": "~5.2.1", "grunt": "~0.4.5", - "grunt-autoprefixer": "~3.0.0", "grunt-browserify": "~3.8.0", "grunt-contrib-clean": "~0.6.0", "grunt-contrib-compress": "~0.13.0", @@ -26,6 +26,7 @@ "grunt-jsvalidate": "~0.2.2", "grunt-legacy-util": "^0.2.0", "grunt-patch-wordpress": "~0.3.0", + "grunt-postcss": "~0.5.4", "grunt-rtlcss": "~1.6.0", "grunt-sass": "~1.0.0", "matchdep": "~0.3.0"