Ticket #44256: 44256.3.diff
File 44256.3.diff, 2.1 KB (added by , 7 years ago) |
---|
-
Gruntfile.js
diff --git Gruntfile.js Gruntfile.js index 86839df62c..ad5a604fb2 100644
module.exports = function(grunt) { 11 11 BUILD_DIR = 'build/', 12 12 BANNER_TEXT = '/*! This file is auto-generated */', 13 13 autoprefixer = require( 'autoprefixer' ), 14 phpUnitWatchGroup = grunt.option( 'group' ); 14 phpUnitWatchGroup = grunt.option( 'group' ), 15 buildFiles = [ 16 '*.php', 17 '*.txt', 18 '*.html', 19 'wp-includes/**', // Include everything in wp-includes. 20 'wp-admin/**', // Include everything in wp-admin. 21 'wp-content/index.php', 22 'wp-content/themes/index.php', 23 'wp-content/themes/twentyten', 24 'wp-content/themes/twentyeleven', 25 'wp-content/themes/twentytwelve', 26 'wp-content/themes/twentythirteen', 27 'wp-content/themes/twentyfourteen', 28 'wp-content/themes/twentyfifteen', 29 'wp-content/themes/twentysixteen', 30 'wp-content/themes/twentyseventeen', 31 'wp-content/plugins/index.php', 32 'wp-content/plugins/hello.php', 33 'wp-content/plugins/akismet' 34 ], 35 cleanFiles = []; 36 37 buildFiles.forEach( function( buildFile ) { 38 cleanFiles.push( BUILD_DIR + buildFile ); 39 } ); 15 40 16 41 if ( 'watch:phpunit' === grunt.cli.tasks[ 0 ] && ! phpUnitWatchGroup ) { 17 42 grunt.log.writeln(); … … module.exports = function(grunt) { 82 107 } 83 108 }, 84 109 clean: { 85 all: [BUILD_DIR], 110 plugins: [BUILD_DIR + 'wp-content/plugins'], 111 themes: [BUILD_DIR + 'wp-content/themes'], 112 all: cleanFiles, 86 113 js: [BUILD_DIR + 'wp-admin/js/', BUILD_DIR + 'wp-includes/js/'], 87 114 dynamic: { 88 115 dot: true, … … module.exports = function(grunt) { 111 138 dot: true, 112 139 expand: true, 113 140 cwd: SOURCE_DIR, 114 src: [ 115 '**', 141 src: buildFiles.concat( [ 116 142 '!js/**', // JavaScript is extracted into separate copy tasks. 117 '! **/.{svn,git}/**', // Ignore version control directories.143 '!.{svn,git}', // Exclude version control folders. 118 144 '!wp-includes/version.php', // Exclude version.php 119 145 '!index.php', '!wp-admin/index.php', 120 146 '!_index.php', '!wp-admin/_index.php' 121 ] ,147 ] ), 122 148 dest: BUILD_DIR 123 149 }, 124 150 {