The script-loader has a few modes of operation.
You can run it in "raw file mode" ( ie $wgEnableScriptLoader = false ).
This will load all your javascript files directly only doing php
requests to get the messages. In this mode php does not touch any js or
css file your developing.
Once ready for production you can enable the script-loader it groups,
localizes, removes debug statements, transforms css url paths, minifies
the set of javascript / css. It includes experimental support for google
closure compiler which does much more aggressive transformations.
I think your misunderstanding the point of the script-loader. Existing
extensions used on wikipedia already do a static package and minify
javascript code.
If you want to have remote user communicate javascript debugging info,
we could add a url flag to avoid minification and or avoid
script-grouping. Maybe be useful in the case of user-scripts / gadgets.
But in general its probably better / easier for end users to just
identify their platform and whats not working, since its all code to
them anyway. If they are a developer or are going to do something
productive with what they are seeking they likely have the code checked
out locally and use the debug mode.
--michael
Aryeh Gregor wrote:
On Mon, May 17, 2010 at 6:43 PM, Maciej Jaros
<egil(a)wp.pl> wrote:
So does this extensions encrypt JS files into
being non-debugable? I
could understand that on sites like Facebook but on an open or even Open
site like Wikipedia/Mediawiki? This just seems to be wrong. Simple
concatenation of files would serve the same purpose in terms of requests
to the server.
At the very least, newlines should be preserved, so you can get a line
number when an error occurs. Stripping other whitespace and comments
is probably actually be worth the performance gain, from what I've
heard, annoying though it may occasionally be. Stripping newlines is
surely not worth the added debugging pain, on the other hand.
(Couldn't you even make up for it by stripping semicolons?)
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l