Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#38423 closed enhancement (fixed)

Alllow builds to be minimal

Reported by: jorbin's profile jorbin Owned by: jorbin's profile jorbin
Milestone: 4.7 Priority: normal
Severity: normal Version: 3.7
Component: Build/Test Tools Keywords: has-patch
Focuses: Cc:


Right now, if you do grunt build it is going to copy everything including every plugin and every theme. This can cause things to slow down, especially if you have something with it's own node_modules folder. There should be a simpler way.

Attachments (1)

38423.diff (566 bytes) - added by jorbin 8 years ago.

Download all attachments as: .zip

Change History (7)

8 years ago

#1 @jorbin
8 years ago

@davidakennedy inspired this by noting that it was taking a long time for him to run run grunt test and seemed to be hanging on Running "copy:files" (copy) task.

This patch allows you to pass in --minimal-copy to any task that uses the copy task (such as build, test, and copy) and it excludes all plugins and all of the themes except for the twenty* series of default themes.

#2 @jorbin
8 years ago

  • Keywords has-patch added

#3 @jorbin
8 years ago

  • Owner set to jorbin
  • Resolution set to fixed
  • Status changed from new to closed

In 38848:

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.

#4 follow-up: @johnbillion
8 years ago

@jorbin Should the functionality of the --minimal-copy flag be used by default, and introduce a --full-copy flag for a full copy?

#5 in reply to: ↑ 4 @netweb
8 years ago

Replying to johnbillion:

@jorbin Should the functionality of the --minimal-copy flag be used by default, and introduce a --full-copy flag for a full copy?

As the primary purpose of WordPress' Grunt file is to build from via grunt build I don't think changing this default functionality should occur in this ticket.

There are quite possible enhancements that could be made to the Grunt tasks to aid developers and committers to speed up some of the current tasks and default task, though as would need to be involved in any changes to the current default task some planning and lead time for make/systems would be beneficial and a new ticket be created to discuss this further.

#6 @ocean90
8 years ago

@jorbin Shouldn't this also include '!wp-content/uploads/'?

Note: See TracTickets for help on using tickets.