WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 5 months ago

#25244 reopened enhancement

Unminified versions of MediaElement.js and MediaElementPlayer not in core

Reported by: ericlewis Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: External Libraries Keywords: needs-patch
Focuses: Cc:

Description

Not sure how this fits into the new Grunt build process so I'll leave this to the big boys/girls.

Change History (13)

comment:1 @ericlewis23 months ago

Also mediaelementplayer.min.css

comment:2 follow-up: @ocean9022 months ago

  • Component changed from Media to External Libraries
  • Keywords close added

We usually doesn't include the unminified versions of external libraries in core. Why should it be included?

comment:3 in reply to: ↑ 2 @ericlewis22 months ago

  • Resolution set to wontfix
  • Status changed from new to closed

Including unminified versions would allow developers to read the original JS/CSS source without leaving their development environment. I was looking for it in this case to copy, paste, and override media element's CSS. Also, If SCRIPT_DEBUG loaded them it would open up the opportunity to debug these packages if necessary.

Last edited 22 months ago by ericlewis (previous) (diff)

comment:4 @ericlewis22 months ago

  • Resolution wontfix deleted
  • Status changed from closed to reopened

comment:5 @nacin22 months ago

We talked about a separate directory (unsure of what we'd call it) in the root of develop.svn that can have all of our external sources. I don't know what we'd call it, but I do know that we'd want script-loader to, if running a develop.svn checkout, automatically load all of these instead of the minified ones.

comment:6 @kadamwhite21 months ago

+1 to that directory, that would be of notable interest to me. Re: the Grunt question, I would assume the build process wouldn't touch these files at all—We should be trusting 3rd-party libraries like Underscore and Backbone to already be providing the optimally minified versions of their files, so we just copy those over rather than running them through our own minification process.

comment:7 @wonderboymusic15 months ago

  • Keywords needs-patch added; close removed
  • Milestone changed from Awaiting Review to Future Release

comment:8 @wonderboymusic7 months ago

  • Milestone changed from Future Release to 4.2

In 4.2, I would like us to answer some JS questions like this

comment:9 @ericlewis7 months ago

We're not too far off from where we currently are.

WordPress-specific source JS files (i.e. un-minified versions) can be loaded by toggling the SCRIPT_DEBUG constant 1.

Some third-party scripts (e.g. Backbone.js, all jQuery UI modules) will only load the unminified version if loaded from the src directory2. Otherwise, the minified version of the script is loaded.

I propose we bring in the source and unminified versions for all third-party modules into the src/ directory, and copy both in the build process. After that, modify the script loader to respect SCRIPT_DEBUG to the tee.

Last edited 7 months ago by ericlewis (previous) (diff)

comment:10 @slackbot7 months ago

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

comment:11 @slackbot6 months ago

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

comment:12 @slackbot5 months ago

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

comment:13 @DrewAPicture5 months ago

  • Milestone changed from 4.2 to Future Release

I'm not sure this ticket strictly belongs on a milestone since we're talking about adding external sources to a directory in the root develop.svn folder – in other words, has nothing to do with a release :-)

Moving to Future Release for triage purposes.

Note: See TracTickets for help on using tickets.