[Pkg-javascript-devel] documentation about distributing minified versions of files

Daniel Kahn Gillmor dkg at fifthhorseman.net
Thu May 9 19:09:26 UTC 2013


On 05/09/2013 02:11 PM, David Prévot wrote:
> Hi,
> 
> Le 09/05/2013 13:40, Daniel Kahn Gillmor a écrit :
>> why is this painful?  During development, you install libjs-jquery
>> alongside whatever other development tools, libraries, frameworks your
>> user project depends on.  your user project links to the
>> /usr/share/javascript/jquery directory, whose contents are provided by
>> libjs-jquery.
> 
> I fail to understand the benefit of the split (as in “what real life
> problem is this supposed to solve?”).

It makes it possible, at a system level, to switch any particular piece
of javascript into (or out of) debug mode without needing to make any
changes to the rest of your webapp stack.  looked at another way, it
makes it possible to deploy the same code with minified javascript even
though you develop with debuggable non-minified js.  Is this useful?  it
seems like it might be to me, but i could be convinced otherwise.

> Please note that some projects (including ownCloud, packaged on Debian)
> allow the web administrator to switch (temporarily) in debug mode,
> where, among other things, the non-minified JavaScript are used instead
> of the usual minified ones. Splitting (and conflicting) minified and
> non-minified JavaScript packages may be painful in some (real life) use
> case.

interesting, thanks for this data point.  does this switch work by
taking advantage of the "min.js" suffix, or via some other mechanism?
does it work for all js (including libraries), or just for the
"owncloud-native" js segments?

Are there other web applications or frameworks or stacks that provide
this feature internally?  Should we expect each framework to implement
it separately?

	--dkg

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1027 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-javascript-devel/attachments/20130509/ed7a6d88/attachment-0001.pgp>


More information about the Pkg-javascript-devel mailing list