views:

35

answers:

2

We have a small javascript project that will be using a handful of jQuery selectors, but we don't by any means need the full jQuery package (i.e. effects). Is there any current way to get a custom build of the latest jQuery (1.4.2)?

+2  A: 

Then you might be intersted in Sizzle selector engine (also used by jQuery for its selector mechanism).

Sarfraz
I think that will do the trick. Thanks!
David Eyk
+1  A: 

You can get source from github http://docs.jquery.com/Downloading_jQuery#Git and modify buildfile (makefile or build.xml, depends on build system you will be using). For apache ant (build.xml) just remove files you don't need from list in the jquery target. Of course this will not handle internal jquery requirements for you, so resulting build can be broken.

pepiino
Makes sense. I probably only need selectors, so I'm going with @sAc's answer, but this will be handy to know for the future. Thanks!
David Eyk
I did end up trying this, just for the fun of it, and it's really easy, though a little scary. Unfortunately, cutting out effects, offset, and dimensions only saves about 3k minified/gzipped. Cutting out more will take some testing to make sure it's safe.
David Eyk