From b4daec8b8c9936e4424e9e4f74d98d73b0cf2ea5 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Wed, 4 Dec 2013 17:21:01 +0000 Subject: [PATCH] Build RTL stylesheets for color schemes. props dd32. fixes #26315. git-svn-id: https://develop.svn.wordpress.org/trunk@26616 602fd350-edb4-49c9-b593-d223f7449a82 --- Gruntfile.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 96548f5fdf..3682fca7e0 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -133,6 +133,20 @@ module.exports = function(grunt) { 'wp-includes/css/*.css' ] }, + colors: { + options: { + processContent: function( src ) { + return src.replace( /([^/]+)\.css/gi, "$1-rtl.css" ); + } + }, + expand: true, + cwd: BUILD_DIR, + dest: BUILD_DIR, + ext: '-rtl.css', + src: [ + 'wp-admin/css/colors/**/*.css' + ] + }, dynamic: { expand: true, cwd: SOURCE_DIR, @@ -346,13 +360,13 @@ module.exports = function(grunt) { grunt.registerTask('copy:all', ['copy:files', 'copy:version']); // RTL task. - grunt.registerTask('rtl', ['cssjanus:core']); + grunt.registerTask('rtl', ['cssjanus:core', 'cssjanus:colors']); // Color schemes task. grunt.registerTask('colors', ['sass:colors']); // Build task. - grunt.registerTask('build', ['clean:all', 'copy:all', 'cssmin:core', 'colors', 'cssmin:colors', 'rtl', 'cssmin:rtl', + grunt.registerTask('build', ['clean:all', 'copy:all', 'cssmin:core', 'colors', 'rtl', 'cssmin:rtl', 'cssmin:colors', 'uglify:core', 'uglify:tinymce', 'concat:tinymce', 'compress:tinymce', 'clean:tinymce']); // Testing tasks.