On 12-07-16 at 10:34pm, Marcelo Jorge Vieira wrote:
> Hi Jonas,
> 
> On Fri, 2012-07-06 at 15:13 +0200, Jonas Smedegaard wrote:
> > On 12-07-05 at 11:05pm, Mehdi Dogguy wrote:
> > > On 05/07/12 22:57, Jonas Smedegaard wrote:
> > > >If we skip installing minified files, then yes it breaks. If we 
> > > >skip minifying but still install - i.e. install files that are 0% 
> > > >minified - then only download times should be affected.
> > > 
> > > I think that this is the best option we have at this stage. In any 
> > > case, it's your call as a maintainer to choose which solution you 
> > > want to implement.
> > > 
> > > Switching to slimit might be a sexy option but also falls in the 
> > > "changing the compressor" category, imho.
> > 
> > How about this:
> > 
> > Now:
> > 
> >  1) Skip generating and installing any minified files at build time.
> >  2) Try minify and fallback to copy in postinst script:
> > 
> >     for if in $files-to-be-minified; do
> >       of="$(basename "$if" .js).min.js"
> >       javascript-minifier -o "$of" "$if" | cp -a "$if" "$of"
> >     done
> > 
> >  3) Remove minified/copied files in "remove" state of postrm script:
> > 
> >     for if in $files-to-be-minified; do
> >       of="$(basename "$if" .js).min.js"
> >       rm -f "$of"
> >     done
> > 
> > (javascript-minifier should use same basic syntax as both 
> > yui-compressor and uglifyjs share today.)
> > 
> > Official result now:
> > 
> >   * Javascript files will not be minified.
> 
> 
> This way all JS packages will depends on javascript-minifier and for 
> me it is not a good idea, because JS packages usually have only some 
> kB of size and do not depend on java or nodejs to run.

I disagree, and I fail to see how you can come to that conclusion.

*now* no JS packages will depend on any JavaScript minifier but instead 
be served non-minified.

*later* (when a package "javascript-minifier" is invented and available) 
JS packages can choose to add runtime dependency on javascript-minifier. 
That will cause an actual minifier to be pulled in.  If deemed sensible 
we can provide a dummy javascript-minifier-dummy package as a fallback 
dependency for those preferring no minification.

...but that is an implementation detail open for discussion, not needed 
to decide now, and even then not needed for all JavaScript package to 
use.


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Pkg-javascript-devel mailing list
Pkg-javascript-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel

Reply via email to