Ticket #26669: modules_without_css.diff
File modules_without_css.diff, 5.1 KB (added by , 11 years ago) |
---|
-
Gruntfile.js
2 2 module.exports = function(grunt) { 3 3 var path = require('path'), 4 4 SOURCE_DIR = 'src/', 5 BUILD_DIR = 'build/'; 5 BUILD_DIR = 'build/', 6 wp_admin_source = [ 7 'toc', 8 'common', 9 'text', 10 'forms', 11 'actions', 12 'notifications', 13 'tinymce', 14 'header', 15 'navmenu', 16 'layoutblocks', 17 'dashboard', 18 'lists', 19 'edit', 20 'categories', 21 'tags', 22 'media', 23 'comments', 24 'themes', 25 'plugins', 26 'users', 27 'tools', 28 'settings', 29 'footer', 30 'about', 31 'overlay_with_sidebar', 32 'customize_loader', 33 'tabbed_admin_screen', 34 'misc', 35 'localization', 36 'uncatagorized' 37 ]; 6 38 7 39 // Load tasks. 8 40 require('matchdep').filterDev('grunt-*').forEach( grunt.loadNpmTasks ); … … 30 62 src: [ 31 63 '**', 32 64 '!**/.{svn,git}/**', // Ignore version control directories. 33 '!wp-includes/version.php' // Exclude version.php65 '!wp-includes/version.php' // Exclude version.php 34 66 ], 35 67 dest: BUILD_DIR 36 68 }, … … 68 100 return src.replace( /([^\.])*\.\.\/src/ig , '/../build' ); 69 101 } 70 102 } 103 }, 104 'wp-admin': { 105 src: SOURCE_DIR + 'wp-admin/css/wp-admin.css', 106 dest: BUILD_DIR + 'wp-admin/css/wp-admin.css' 107 71 108 } 72 109 }, 73 110 sass: { … … 93 130 'wp-includes/css/*.css', 94 131 // Exceptions 95 132 '!wp-admin/css/theme.css', // Temporary file 133 '!wp-admin/css/wp-admin-*.css', 96 134 '!wp-admin/css/farbtastic.css' 97 135 ] 98 136 }, 137 'wp-admin': { 138 expand: true, 139 cwd: BUILD_DIR, 140 dest: BUILD_DIR, 141 ext: '.min.css', 142 src: [ 143 'wp-admin/css/wp-admin.css' 144 ] 145 }, 99 146 rtl: { 100 147 expand: true, 101 148 cwd: BUILD_DIR, … … 127 174 ext: '-rtl.css', 128 175 src: [ 129 176 'wp-admin/css/*.css', 130 'wp-includes/css/*.css' 177 'wp-includes/css/*.css', 178 '!wp-admin/css/wp-admin-*.css' 131 179 ] 132 180 }, 181 'wp-admin': { 182 options: { 183 swapLtrRtlInUrl: false 184 }, 185 expand: true, 186 cwd: BUILD_DIR, 187 dest: BUILD_DIR, 188 ext: '-rtl.css', 189 src: [ 190 'wp-admin/css/wp-admin.css' 191 ] 192 }, 133 193 colors: { 134 194 options: { 135 195 processContent: function( src ) { … … 283 343 BUILD_DIR + 'wp-includes/js/tinymce/plugins/*/plugin.min.js' 284 344 ], 285 345 dest: BUILD_DIR + 'wp-includes/js/tinymce/wp-tinymce.js' 286 } 346 }, 347 'wp-admin': { 348 options: { 349 separator: '\n' 350 }, 351 src: wp_admin_source.map(function(file){ 352 return SOURCE_DIR + 'wp-admin/css/wp-admin-' + file + '.css'; 353 }), 354 dest: BUILD_DIR + 'wp-admin/css/wp-admin.css' 355 356 } 287 357 }, 288 358 compress: { 289 359 tinymce: { … … 342 412 // Color schemes task. 343 413 grunt.registerTask('colors', ['sass:colors']); 344 414 415 // wp-admin.css 416 grunt.registerTask('build:wpadmincss', ['concat:wp-admin', 'cssmin:wp-admin', 'cssjanus:wp-admin']); 417 345 418 // Build task. 346 419 grunt.registerTask('build', ['clean:all', 'copy:all', 'cssmin:core', 'colors', 'rtl', 'cssmin:rtl', 'cssmin:colors', 347 ' uglify:core', 'concat:tinymce', 'compress:tinymce', 'clean:tinymce']);420 'build:wpadmincss', 'uglify:core', 'concat:tinymce', 'compress:tinymce', 'clean:tinymce']); 348 421 349 422 // Testing tasks. 350 423 grunt.registerMultiTask('phpunit', 'Runs PHPUnit tests, including the ajax and multisite tests.', function() { -
src/wp-includes/script-loader.php
549 549 550 550 $rtl_styles = array( 'wp-admin', 'ie', 'media', 'admin-bar', 'customize-controls', 'media-views', 'wp-color-picker', 'wp-pointer', 'editor-buttons', 'farbtastic', 'wp-auth-check', 'wp-jquery-ui-dialog', 'media-views', 'buttons', 'install', 'colors-fresh' ); 551 551 552 $styles->add( 'wp-admin', "/wp-admin/css/wp-admin$suffix.css", array( 'open-sans', 'dashicons' ) ); 552 if ( SCRIPT_DEBUG ) { 553 $admin_dependencies = array( 'toc' , 'common' , 'text' , 'forms' , 'actions' , 'notifications' , 'tinymce' , 'header' , 554 'navmenu' , 'layoutblocks' , 'dashboard' , 'lists' , 'edit' , 'categories' , 'tags' , 'media' , 'comments' , 555 'themes' , 'plugins' , 'users' , 'tools' , 'settings' , 'footer' , 'about' , 'overlay_with_sidebar' , 556 'customize_loader' , 'tabbed_admin_screen' , 'misc' , 'localization' , 'uncatagorized' ); 557 foreach ( $admin_dependencies as $dependency ) { 558 $a = $styles->add( $dependency, "/wp-admin/css/wp-admin-$dependency.css" ); 559 } 560 // open-sans and dashicons are already registered, but still need to be declared as dependencies 561 array_push( $admin_dependencies, 'open-sans', 'dashicons' ); 562 } else { 563 $admin_dependencies = array( 'open-sans', 'dashicons' ); 564 } 553 565 566 $styles->add( 'wp-admin', "/wp-admin/css/wp-admin$suffix.css", $admin_dependencies ); 567 554 568 $styles->add( 'ie', "/wp-admin/css/ie$suffix.css" ); 555 569 $styles->add_data( 'ie', 'conditional', 'lte IE 7' ); 556 570