4 ms·
The google closure tools provides this modularity automatically. The compiler removes unused functions in the google closure library.
by moonboots 15y ago
The google closure tools provides this modularity automatically. The compiler removes unused functions in the google closure library.
- akrymski 15y agoyes that should be the way to go, not providing a library in lots of parts (i've yet to try it - how well does it work in practice?). compilers should handle this for you (linking in only the required functions) instead of distributing a library in chunks. i would also like to see jQuery versions for different browsers (kinda like Zepto for Webkit but with 100% of the APIs) - so I could compile using closure against different libraries and serve just the right stuff to different user agents. it shouldn't be hard to add user-agent specific comments to jQuery so the library could be used to produce user-agent specific versions. i think the relative popularity of zepto shows that there's a need for that.