On Fri, Aug 28, 2015 at 10:06:17AM +0200, Vincent Bernat wrote: > ❦ 28 août 2015 08:22 +0100, Philip Hands <p...@hands.com> : > > >>> Or alternatively, by packaging the minifier that is being used with the > >>> package > >>> that needs it. Yes, that's a horrible idea with lots of code > >>> duplication, but > >>> if I understand the problem, every JS file must be minified with the exact > >>> version of the minifier that upstream used, so then every package would > >>> have > >>> its own unique package that it depends on, and in that case they can just > >>> be > >>> merged. But it can't really be that bad, right? > >> > >> Here is the dependency graph of jQuery (only to build it!): > >> > >> jquery@3.0.0-pre /home/bernat/src/jquery > > [ very long list ] > >> ├─┬ grunt-contrib-jshint@0.11.2 > > ... > >> │ └─┬ jshint@2.8.0 > > ^^^^^^^^^^^^ > > > > I don't know much about this, but I do know that that is a version that > > contains code licensed under the "Do No Evil" license of JSlint: > [...] > > It would be quite easy to not use it at all. Here is a curated list > which removes any tool needed only for testing and linting: > > jquery@3.0.0-pre /home/bernat/src/jquery > ├─┬ commitplease@2.0.0 [...] > └── win-spawn@2.0.0 > > Maybe it can be trimmed a bit more, but that's still 239 unique > dependencies. But no jshint is needed (and for building, its usefulness > is void, so we could just remove the grunt-contrib-jshint package and > keep every other tests).
At least for jquery 1.x, I just managed to reproduce the upstream build with ~ 100 lines of code. ~70 of those were basically copied from the upstream grunt stuff: https://anonscm.debian.org/cgit/pkg-javascript/jquery.git/tree/debian/build.js?h=debian/1.11.3%2bdfsg-3 the other ~30 lines are make targets in debian/rules: https://anonscm.debian.org/cgit/pkg-javascript/jquery.git/tree/debian/rules?h=debian/1.11.3%2bdfsg-3 I had to read the source of the upstream grunt build task, understand that it uses something called "requirejs", doing some reading on what requirejs is and how to use it, then extracting the build logic into a file that could be used with requirejs (which is already packages as node-reuqirejs) only -- without grunt -- and there we have it. -- Antonio Terceiro <terce...@debian.org>
signature.asc
Description: Digital signature