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

Re: Minified files and source code requirement



W dniu 27.10.2011 11:43, Pau Garcia i Quiles pisze:
On Thu, Oct 27, 2011 at 11:34 AM, Zygmunt Krynicki
<zygmunt.krynicki@canonical.com>  wrote:
W dniu 27.10.2011 11:22, Pau Garcia i Quiles pisze:

I said this in the original thread and I'll repeat it here: if we have
the non-minified JavaScript, then I see no problem in providing only
the minified version in the binary package.

I'd like to twist this to a different viewpoint. For me as a developer
having -dev packages with non-minified version would be an awesome
improvement. Assuming I'm already using the lijs* packages for my work I
could simply install the -dev packages and flip a switch to use non-minified
versions and debug my application better.

Mmmm interesting, I had not thought about -dev packages. I was talking
about runtime packages all the time.

The main "problem" I see is for many JavaScript libraries the minified
version has a different name (jsquery.min.js vs jquery.js). This would
be easily solvable by using symlinks in most cases, although it is
additional work for the package maintainer.  (in the case of witty, it
is not solvable: a C++ file is generated from the JavaScript source
when building, and there is no .js file to replace on runtime).


We could use this pattern:

libjsfoo package ships a file that is exposed as http://*/javascript/foo/foo.min.js

libjsfoo package ships a file that is exposed as http://*/javascript/foo/foo.js

A config option somewhere could allow a developer administering his own system to serve foo.js instead of foo.min.js when accesed from the /javascript namespace. I guess this could be done in javascript-common.conf

There are no symlinks involved (no maintainer scripts needed), the administrator has control over the configuration, -dev packages are genuinely useful to developers, non -dev packages are smaller.

Best regards
ZK


Reply to: