[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Minified javascripts in packages



On Tue, 14 Apr 2015 08:40:07 +0200
Vincent Bernat <bernat@debian.org> wrote:
>  ❦ 14 avril 2015 11:00 +1000, Ben Finney <ben+debian@benfinney.id.au> :
> 
> >> > I presume that we can agree that, if someone started offering a web
> >> > service compiling C code with output an order of magnitude better in
> >> > every dimension than gcc can achieve, we still wouldn't use it for
> >> > our binaries (at least not unless it were available as free software
> >> > that we could host ourselves). What makes JavaScript worthy of
> >> > special treatment?
> >>
> >> It is an interpreted language and "compiled" source can sometimes be
> >> considered as a pristine source too (for example, concatenation).
> >
> > No, a concatenated bundle – the compiled form – is not the preferred
> > form for making modifications to the work. So it's not the source
> > form.
> 
> Sorry, that's not always true. The concatenated form may not be the
> preferred form for making modifications for the upstream author but for
> a user, this may be perfectly valid. The prefered form of modification
> of the derivative may become the concatenated form. Or the selected
> form. License-wise, those derivatives are still perfectly valid since
> usually, all this is MIT-licensed.
> 
> If you take bootstrap for example, the upstream preferred form for
> making modifications is here:
>  https://github.com/twbs/bootstrap/tree/master/less
> 
> But many people just starts of the generated bootstrap.css (which is
> generated and concatenated but not minified) because it is perfectly
> valid and understandable CSS. And they do modification to that when they
> want to modify a small aspect. They don't bother starting from the whole
> LESS files (especially if the remaining of their project is not using
> LESS). They may also remove parts they don't use for optimization
> purpose. That's very hard to rebuild what they got from the original
> LESS files.

It makes sense that for small changes, the preferred form for
modification would be the generated bootstrap.css. A potential problem
with this would be that you can generate bootstrap.css from the LESS
files, but (I assume) you can't generate the LESS files from the
bootstrap.css.

Perhaps more importantly, CSS is easily understandable, whereas
minified javascript is not. Debugging minified javascript is almost
impossible.

Attachment: pgp2QWHRuYl51.pgp
Description: PGP signature


Reply to: