Zepto’s default package contains these modules: zepto, event, ajax, form and ie (check Zepto site for explanations and full list of modules!).
A very cool thing about Zepto is that you can create your own package with only needed modules! To build a custom Zepto library you should have Node.js installed on your system and follow these steps (for linux and OSX):
- download Zepto source code from Github (i.e. in zip archive)
- unzip it and open a terminal in that directory (i.e. you should be inside something like ‘/tmp/zepto-master/’)
- execute following command:
- npm install
- npm run-script dist
- MODULES=”zepto event data” npm run-script dist
…where “zepto event data” is a space-separated list of wanted modules! After this you should find your Zepto custom library (uncompressed, minified and gzipped) inside ‘dist’ directory (i.e. ‘/tmp/zepto-master/dist/’)…
Please note that inside your custom library you can find in the first line a comment with your choosen modules.