Ticket #26669: 26669-gruntfile.2.diff
File 26669-gruntfile.2.diff, 2.3 KB (added by , 11 years ago) |
---|
-
Gruntfile.js
65 65 } 66 66 ] 67 67 }, 68 'wp-admin-rtl': { 69 options: { 70 processContent: function( src ) { 71 return src.replace( /\.css/g, '-rtl.css' ); 72 } 73 }, 74 src: SOURCE_DIR + 'wp-admin/css/wp-admin.css', 75 dest: BUILD_DIR + 'wp-admin/css/wp-admin-rtl.css' 76 }, 68 77 version: { 69 78 options: { 70 79 processContent: function( src ) { … … 71 80 return src.replace( /^(\$wp_version.+?)-src';/m, '$1\';' ); 72 81 } 73 82 }, 74 files: [ 75 { 76 src: SOURCE_DIR + 'wp-includes/version.php', 77 dest: BUILD_DIR + 'wp-includes/version.php' 78 } 79 ] 83 src: SOURCE_DIR + 'wp-includes/version.php', 84 dest: BUILD_DIR + 'wp-includes/version.php' 80 85 }, 81 86 dynamic: { 82 87 dot: true, … … 108 113 } 109 114 }, 110 115 cssmin: { 116 options: { 117 'wp-admin': ['wp-admin', 'color-picker', 'customize-controls', 'ie', 'install', 'deprecated-*'] 118 }, 111 119 core: { 112 120 expand: true, 113 121 cwd: SOURCE_DIR, … … 114 122 dest: BUILD_DIR, 115 123 ext: '.min.css', 116 124 src: [ 117 'wp-admin/css/*.css', 118 'wp-includes/css/*.css', 119 // Exceptions 120 '!wp-admin/css/farbtastic.css' 125 'wp-admin/css/{<%= cssmin.options["wp-admin"] %>}.css', 126 'wp-includes/css/*.css' 121 127 ] 122 128 }, 123 129 rtl: { … … 126 132 dest: BUILD_DIR, 127 133 ext: '.min.css', 128 134 src: [ 129 'wp-admin/css/ *-rtl.css',135 'wp-admin/css/{<%= cssmin.options["wp-admin"] %>}-rtl.css', 130 136 'wp-includes/css/*-rtl.css' 131 137 ] 132 138 }, … … 390 396 391 397 // Register tasks. 392 398 393 // Copy task.394 grunt.registerTask('copy:all', ['copy:files', 'copy:version']);395 396 399 // RTL task. 397 400 grunt.registerTask('rtl', ['cssjanus:core', 'cssjanus:colors']); 398 401 … … 403 406 grunt.registerTask('precommit', 'Runs front-end dev/test tasks in preparation for a commit.', 404 407 ['autoprefixer:core', 'imagemin:core', 'jshint', 'qunit:compiled']); 405 408 409 // Copy task. 410 grunt.registerTask('copy:all', ['copy:files', 'copy:wp-admin-rtl', 'copy:version']); 411 406 412 // Build task. 407 413 grunt.registerTask('build', ['clean:all', 'copy:all', 'cssmin:core', 'colors', 'rtl', 'cssmin:rtl', 'cssmin:colors', 408 414 'uglify:core', 'concat:tinymce', 'compress:tinymce', 'clean:tinymce', 'jsvalidate:build']);