Can you create a custom jQuery library build? [closed]
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 way to get a custom build of the jQuery library?
This question was asked before this answer was available - but I feel the question is still relevant.
http://net.tutsplus.com/tutorials/javascript-ajax/how-to-build-your-own-custom-jquery/
http://projects.jga.me/jquery-builder/
Hope others find these links as helpful as I have.
Update Depending on how minimal you want to go you could make your own library, I've used this as a starting concept before: http://code.tutsplus.com/tutorials/build-your-first-javascript-library--net-26796
Source code available here: https://github.com/andrew8088/dome
Then you might be intersted in Sizzle selector engine (also used by jQuery for its selector mechanism).
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.
精彩评论