Make WordPress Core

Changeset 38848


Ignore:
Timestamp:
10/20/2016 10:23:21 PM (8 years ago)
Author:
jorbin
Message:

Build/Test Tools: Allow Minimal Builds

Builds can hang or get very slow on copy when you have alot of files. Alot of files can suddenly appear when you are developing new themes or plugins. Often, it's nice to have a minimal build, especially if you are preparing a commit.

This adds a new flag --minimal-copy that can be added to any task which does a copy. These tasks include build, test, and copy. This flag will cause no plugins to be copied and only the twenty series of default themes to be copied. Everything else remains the same.

Fixes #38423.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Gruntfile.js

    r38840 r38848  
    646646    });
    647647
     648    // Allow builds to be minimal
     649    if( grunt.option( 'minimal-copy' ) ) {
     650        var copyFilesOptions = grunt.config.get( 'copy.files.files' );
     651        copyFilesOptions[0].src.push( '!wp-content/plugins/**' );
     652        copyFilesOptions[0].src.push( '!wp-content/themes/!(twenty*)/**' );
     653        grunt.config.set( 'copy.files.files', copyFilesOptions );
     654    }
     655
     656
    648657    // Register tasks.
    649658
Note: See TracChangeset for help on using the changeset viewer.