Here's a quick guide to building a custom Zepto from the comfort of your command line.
Either install Zepto to your project with Bower:
$ bower install zeptoOr clone it from Git:
$ git clone https://github.com/madrobby/zepto.gitcd into Zepto's directory:
$ cd zepto/Then, (from the Zepto dir) get the tools needed for the custom build process:
$ npm installFinally the actual build process:
$ MODULES="zepto event ajax form ie" ./make distThis will make a Zepto build with the chosen modules, in this case: zepto,
event, ajax, form, and ie. The newly created file can be found in the dist
directory.
Below are the available modules. At least the defaults should be installed in order for Zepto to work.
| module | default | description |
|---|---|---|
zepto | ✔ | Core module; contains most methods |
event | ✔ | Event handling via |
ajax | ✔ | XMLHttpRequest and JSONP functionality |
form | ✔ | Serialize & submit web forms |
ie | ✔ | Add support for Internet Explorer 10+ on desktop and Windows Phone 8. |
detect detect | Provides | |
fx | The | |
fx_methods | Animated | |
assets | Experimental support for cleaning up iOS memory after removing image elements from the DOM. | |
data | A full-blown | |
deferred | Provides | |
callbacks | Provides | |
selector | Experimental jQuery CSS support for functionality such as
| |
touch | Fires tap– and swipe–related events on touch devices. This works with
both | |
gesture | Fires pinch gesture events on touch devices | |
stack | Provides | |
ios3 |
|
There's also a one-page app to do the build for you.