[wp-trac] [WordPress Trac] #21633: Switch to min.js convention
WordPress Trac
wp-trac at lists.automattic.com
Sun Aug 19 19:21:45 UTC 2012
#21633: Switch to min.js convention
----------------------------+------------------
Reporter: nbachiyski | Owner:
Type: task (blessed) | Status: new
Priority: normal | Milestone: 3.5
Component: General | Version:
Severity: normal | Resolution:
Keywords: |
----------------------------+------------------
Changes (by nacin):
* type: feature request => task (blessed)
* milestone: Awaiting Review => 3.5
Comment:
koopersmith and I were discussing this just yesterday. I strongly agree
with this. It's also easy to do, and I don't think a patch would even be
needed (beyond a few lines in script-loader), as most of the magic here is
simply getting the svn copy commands right so history doesn't get all
screwed up, like what happened in [10291].
Though implied, just going to state we should do this for CSS as well.
> Plugins should be using wp_enqueue_script() and changing paths shouldn't
be a problem.
Not only that, but no developer would really ever be referencing .dev.js
directly. So if they were referencing .js directly, they'll simply go from
using the minified to the unminified scripts.
> With this I would also give a vote for a new arg $dev in
WP_SCRIPTS/WP_STYLES API which controls minified files.
I like this, though I'm not sure how I feel about a new argument on
wp_register/enqueue_script. There are probably three or four proposed new
parameters for this function across Trac. I think it is time to convert
$in_footer = false to an array of extra arguments, so 'footer' => true and
the like. (As scribu just recommended as well.)
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21633#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list