WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#31911 closed defect (bug) (fixed)

Media splitting: just copy the files for build instead of uglifying them

Reported by: iseulde Owned by: iseulde
Milestone: 4.4 Priority: normal
Severity: normal Version: 4.2
Component: Build/Test Tools Keywords: has-patch
Focuses: javascript Cc:

Description (last modified by iseulde)

  • Don't uglify, just copy like the other watch tasks.
  • Only copy the changed files, currently it uglifies all of them.
  • Exclude media files from the all task.
  • Clean up the callback a bit.

Attachments (4)

31911.patch (2.5 KB) - added by iseulde 4 years ago.
31911.2.patch (2.0 KB) - added by iseulde 4 years ago.
31911.diff (444 bytes) - added by jdgrimes 4 years ago.
Don't ignore manifest files
31911.3.patch (1.1 KB) - added by iseulde 4 years ago.

Download all attachments as: .zip

Change History (24)

#1 @iseulde
4 years ago

  • Description modified (diff)

@iseulde
4 years ago

@iseulde
4 years ago

#2 @iseulde
4 years ago

Makes it pretty fast: Completed in 0.012s at Mon Apr 06 2015 16:46:39 GMT-0400 (EDT)

This ticket was mentioned in Slack in #core by iseulde. View the logs.


4 years ago

#4 @netweb
4 years ago

  • Component changed from Media to Build/Test Tools

#5 @wonderboymusic
4 years ago

  • Milestone changed from Future Release to 4.4

#6 @wonderboymusic
4 years ago

In 33959:

Pre-req for Media builds: make sure the watcher actually works for browserify.

See #31911.

#7 @wonderboymusic
4 years ago

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

In 33960:

Speed up browserify builds, don't uglify the media builds on watch.

Props iseulde.
Fixes #31911.

#8 follow-up: @jdgrimes
4 years ago

I'm not sure why the *.manifest files aren't being watched. Shouldn't the browserify task be run on the media files when the manifests are edited as well?

#9 in reply to: ↑ 8 ; follow-up: @wonderboymusic
4 years ago

  • Keywords needs-patch added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Replying to jdgrimes:

I'm not sure why the *.manifest files aren't being watched. Shouldn't the browserify task be run on the media files when the manifests are edited as well?

They should be - the watcher was totally broken, so the fixes above were a start. Not watching them is an oversight, wanna patch it for some easy props?

@jdgrimes
4 years ago

Don't ignore manifest files

#10 in reply to: ↑ 9 @jdgrimes
4 years ago

  • Keywords has-patch added; needs-patch removed

Replying to wonderboymusic:

Replying to jdgrimes:

I'm not sure why the *.manifest files aren't being watched. Shouldn't the browserify task be run on the media files when the manifests are edited as well?

They should be - the watcher was totally broken, so the fixes above were a start. Not watching them is an oversight, wanna patch it for some easy props?

31911.diff

#11 follow-up: @wonderboymusic
4 years ago

one step further, we need the watcher to:

  • watch the proper files
  • build them into media-*.js files
  • only copy the built files over, not the files in media/*

I'm not sure how or when we borked this so completely

#12 in reply to: ↑ 11 ; follow-up: @netweb
4 years ago

Replying to wonderboymusic:

I'm not sure how or when we borked this so completely

wonderboymusic is fired r31629

#13 in reply to: ↑ 12 @wonderboymusic
4 years ago

Replying to netweb:

Replying to wonderboymusic:

I'm not sure how or when we borked this so completely

wonderboymusic is fired r31629

I would focus on the Props iseulde... portion, mostly.

#14 @wonderboymusic
4 years ago

  • Owner changed from wonderboymusic to iseulde
  • Status changed from reopened to assigned

hey @iseulde, welcome back! funny story: you, me, we, at some point, broke this. Still isn't in an ideal state - see comment:11

#15 @iseulde
4 years ago

  • Status changed from assigned to accepted

This ticket was mentioned in Slack in #core by iseulde. View the logs.


4 years ago

@iseulde
4 years ago

#17 @iseulde
4 years ago

@wonderboymusic No need to watch the modules, and the built media files are copied through all. I can't get watchify to work with grunt-browserify v 3.8, updating to 4.0 fixes the problem for me.

#18 @iseulde
4 years ago

Please review, let me know if anything unexpected happens.

#19 @wonderboymusic
4 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 34888:

Build Tools: upgrade grunt-browserify to ~4.0.0 and remove the watch task for browserify, which has its own internal watcher. Run npm install to update.

Props iseulde.
Fixes #31911.

This ticket was mentioned in Slack in #core by netweb. View the logs.


4 years ago

Note: See TracTickets for help on using tickets.