From 307f8d855810f17f22bff5d58e2e3de00ab1f1e5 Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Thu, 10 Mar 2016 16:00:11 +0000 Subject: [PATCH] =?UTF-8?q?Build=20Tools:=20Update=20grunt-rtlcss=20~1.6.0?= =?UTF-8?q?=20=E2=86=92=20~2.0.1.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This updates the underlying RTLCSS framework to 2.0 which provides new options and config settings, see https://github.com/MohammadYounes/rtlcss/blob/master/CHANGELOG.md#200---18-feb-2016. See #35104. Build: https://build.trac.wordpress.org/changeset/36903 git-svn-id: https://develop.svn.wordpress.org/trunk@36935 602fd350-edb4-49c9-b593-d223f7449a82 --- Gruntfile.js | 57 ++++++++++++++++++++++++++++++---------------------- package.json | 2 +- 2 files changed, 34 insertions(+), 25 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 6917b9b0a8..01f01b252f 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -210,14 +210,14 @@ module.exports = function(grunt) { rtlcss: { options: { // rtlcss options - config: { - swapLeftRightInUrl: false, - swapLtrRtlInUrl: false, - autoRename: false, - preserveDirectives: true, + opts: { + clean: false, + processUrls: { atrule: true, decl: false }, stringMap: [ { name: 'import-rtl-stylesheet', + priority: 10, + exclusive: true, search: [ '.css' ], replace: [ '-rtl.css' ], options: { @@ -227,29 +227,38 @@ module.exports = function(grunt) { } ] }, - properties : [ + saveUnmodified: false, + plugins: [ { name: 'swap-dashicons-left-right-arrows', - expr: /content/im, - action: function( prop, value ) { - if ( value === '"\\f141"' ) { // dashicons-arrow-left - value = '"\\f139"'; - } else if ( value === '"\\f340"' ) { // dashicons-arrow-left-alt - value = '"\\f344"'; - } else if ( value === '"\\f341"' ) { // dashicons-arrow-left-alt2 - value = '"\\f345"'; - } else if ( value === '"\\f139"' ) { // dashicons-arrow-right - value = '"\\f141"'; - } else if ( value === '"\\f344"' ) { // dashicons-arrow-right-alt - value = '"\\f340"'; - } else if ( value === '"\\f345"' ) { // dashicons-arrow-right-alt2 - value = '"\\f341"'; + priority: 10, + directives: { + control: {}, + value: [] + }, + processors: [ + { + expr: /content/im, + action: function( prop, value ) { + if ( value === '"\\f141"' ) { // dashicons-arrow-left + value = '"\\f139"'; + } else if ( value === '"\\f340"' ) { // dashicons-arrow-left-alt + value = '"\\f344"'; + } else if ( value === '"\\f341"' ) { // dashicons-arrow-left-alt2 + value = '"\\f345"'; + } else if ( value === '"\\f139"' ) { // dashicons-arrow-right + value = '"\\f141"'; + } else if ( value === '"\\f344"' ) { // dashicons-arrow-right-alt + value = '"\\f340"'; + } else if ( value === '"\\f345"' ) { // dashicons-arrow-right-alt2 + value = '"\\f341"'; + } + return { prop: prop, value: value }; + } } - return { prop: prop, value: value }; - } + ] } - ], - saveUnmodified: false + ] }, core: { expand: true, diff --git a/package.json b/package.json index f0293fb5d8..e20854c08c 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "grunt-legacy-util": "^0.2.0", "grunt-patch-wordpress": "~0.3.0", "grunt-postcss": "~0.7.1", - "grunt-rtlcss": "~1.6.0", + "grunt-rtlcss": "~2.0.1", "grunt-sass": "~1.1.0", "matchdep": "~1.0.0" }