Hacker News new | ask | show | jobs
by alastair 5348 days ago
Why isn't there a tool that analyzes which functions / features of jQuery your project is using and generates a smaller library with only the stuff you need?

I'm not really a developer so ignore if that's not possible / makes no sense.

2 comments

That plus server-side browser sniffing to serve only what the user's browser needs could result in an extremely reduced file size. But of course the PITA would then be to maintain that.
Google's Closure compiler can apparently do that.
Doesn't work on jquery. To use that functionality of the closure compiler without breaking your code, the source has to be annotated in a special way, or it has to be incredibly simple.
I don't know much about this, but do you mean http://code.google.com/p/closure-compiler/source/browse/trun... ? That suggests that it will be available at some point, at least...