oky... branch /branches/script-loader/ ready for wider testing
after you check out the branch you have to add $wgEnableScriptLoader =
true; to your local settings.
Things I don't tackle in this version of the scriptLoader:
1) checking the version of every msg string packaged in JS (right now I
will just rely on bumping the $wgStyleVersion up global var to clear
caches as not many projects besides mine are using JavaScript msg
packing system yet ;) ... and there are other issues with the language
packaging that need to be addressed. But I do check the latest revision
id for every wiki page that is included via the scriptLoader. This has
the nice benefit of once you save a gadget preference or update a user
javascript page you don't have to "shift reload" as a new unique
javascript request id is automatically generated.
2) Style sheet grouping is a bit tricky cuz you have to rewrite all the
relative paths to a different relative position since its being served
from the script server location. There is a library that handles this:
http://code.google.com/p/minify/source/browse/trunk/min/lib/Minify/CSS.php
but i have not integrated that yet...so style sheets are still
individually requested. If we really want all the style sheets grouped I
can bump that on the priority list to right after the upload api stuff
that I have to finish up ;)
--michael
Brion Vibber wrote:
Just a heads-up --
Michael Dale is working on some cleanup of how the various JavaScript
bits are loaded by the skins to centralize some of the currently
horridly spread-out code and make it easier to integrate in a
centralized loader so we can serve more JS together in a single
compressed request.
Unless there's a strong objection I'd be very happy for this to also
include loading up the jQuery core library as a standard component.
The minified jQuery core is 19k gzipped, and can simplify other JS code
significantly so we can likely chop down wikibits.js, mwsuggest.js, and
the site-customized Monobook.js files by a large margin for a net savings.
If you've done browser-side JavaScript development without jQuery and
wanted to kill yourself, I highly recommend you try jQuery -- it's
sooooo nice. :)
-- brion
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l