Ticket #30666: 30666.1.diff
File 30666.1.diff, 3.3 KB (added by , 10 years ago) |
---|
-
Gruntfile.js
diff --git Gruntfile.js Gruntfile.js index bcfdd75..34158a0 100644
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 banner = '/*! This file is auto-generated - please do not patch. */'; 6 7 7 8 // Load tasks. 8 9 require('matchdep').filterDev(['grunt-*', '!grunt-legacy-util']).forEach( grunt.loadNpmTasks ); … … module.exports = function(grunt) { 421 422 dest: SOURCE_DIR 422 423 } 423 424 }, 425 usebanner: { 426 cssmin: { 427 options: { 428 position: 'top', 429 banner: banner, 430 linebreak: true, 431 'wp-admin': ['wp-admin', 'color-picker', 'customize-controls', 'customize-widgets', 'ie', 'install', 'login', 'deprecated-*'] 432 }, 433 files: { 434 src: [ 435 BUILD_DIR + 'wp-admin/css/{<%= cssmin.options["wp-admin"] %>}.min.css', 436 BUILD_DIR + 'wp-includes/css/*.min.css', 437 BUILD_DIR + 'wp-admin/css/colors/*/*.css', 438 439 // Exceptions 440 '!' + BUILD_DIR + 'wp-admin/css/{<%= cssmin.options["wp-admin"] %>}-rtl.min.css', 441 '!' + BUILD_DIR + 'wp-includes/css/*-rtl.min.css', 442 '!' + BUILD_DIR + 'wp-admin/css/colors/*/*-rtl*.css' 443 ] 444 } 445 }, 446 cssjanus: { 447 options: { 448 position: 'top', 449 banner: banner, 450 linebreak: true 451 }, 452 files: { 453 src: [ 454 BUILD_DIR + 'wp-admin/css/*-rtl*.css', 455 BUILD_DIR + 'wp-includes/css/*-rtl*.css', 456 BUILD_DIR + 'wp-admin/css/colors/*/*-rtl*.css', 457 ] 458 } 459 }, 460 uglify: { 461 options: { 462 position: 'top', 463 banner: banner, 464 linebreak: true 465 }, 466 files: { 467 src: [ 468 BUILD_DIR + 'wp-admin/js/*.min.js', 469 BUILD_DIR + 'wp-includes/js/*.min.js', 470 BUILD_DIR + 'wp-includes/js/plupload/handlers.min.js', 471 BUILD_DIR + 'wp-includes/js/plupload/wp-plupload.min.js', 472 BUILD_DIR + 'wp-includes/js/tinymce/wp-tinymce.min.js', 473 474 // Exceptions 475 '!' + BUILD_DIR + 'wp-admin/js/iris.min.js', 476 '!' + BUILD_DIR + 'wp-includes/js/backbone.min.js', 477 '!' + BUILD_DIR + 'wp-includes/js/underscore.min.js', 478 '!' + BUILD_DIR + 'wp-includes/js/zxcvbn.min.js' 479 ] 480 } 481 } 482 }, 424 483 watch: { 425 484 all: { 426 485 files: [ … … module.exports = function(grunt) { 481 540 // Copy task. 482 541 grunt.registerTask('copy:all', ['copy:files', 'copy:wp-admin-rtl', 'copy:version']); 483 542 543 // Banner task. 544 grunt.registerTask('banner', ['usebanner:cssmin', 'usebanner:cssjanus', 'usebanner:uglify']); 545 484 546 // Build task. 485 547 grunt.registerTask('build', ['clean:all', 'copy:all', 'cssmin:core', 'colors', 'rtl', 'cssmin:rtl', 'cssmin:colors', 486 'uglify:core', 'uglify:jqueryui', 'concat:tinymce', ' compress:tinymce', 'clean:tinymce', 'jsvalidate:build']);548 'uglify:core', 'uglify:jqueryui', 'concat:tinymce', 'banner', 'compress:tinymce', 'clean:tinymce', 'jsvalidate:build']); 487 549 488 550 // Testing tasks. 489 551 grunt.registerMultiTask('phpunit', 'Runs PHPUnit tests, including the ajax, external-http, and multisite tests.', function() { -
package.json
diff --git package.json package.json index 827529f..40e5f16 100644
26 26 "grunt-legacy-util": "^0.2.0", 27 27 "grunt-patch-wordpress": "~0.2.1", 28 28 "grunt-sass": "~0.16.0", 29 "grunt-banner": "~0.2.3", 29 30 "matchdep": "~0.3.0" 30 31 } 31 32 }