开发者

Can you create a custom jQuery library build? [closed]

As it开发者_如何转开发 currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 9 years ago.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜