# How to build a custom zepto

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:

```shell
$ bower install zepto
```

Or clone it from Git:

```shell
$ git clone https://github.com/madrobby/zepto.git
```

`cd` into Zepto's directory:

```shell
$ cd zepto/
```

Then, (from the Zepto dir) get the tools needed for the custom build process:

```shell
$ npm install
```

Finally the actual build process:

```shell
$ MODULES="zepto event ajax form ie" ./make dist
```

This 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](http://github.e-sites.nl/zeptobuilder/). At
least the defaults should be installed in order for Zepto to work.

module
      default
      description

[zepto](https://github.com/madrobby/zepto/blob/master/src/zepto.js#files)

✔
      Core module; contains most methods

[event](https://github.com/madrobby/zepto/blob/master/src/event.js#files)

✔

Event handling via `on()` & `off()`

[ajax](https://github.com/madrobby/zepto/blob/master/src/ajax.js#files)

✔
      XMLHttpRequest and JSONP functionality

[form](https://github.com/madrobby/zepto/blob/master/src/form.js#files)

✔
      Serialize & submit web forms

[ie](https://github.com/madrobby/zepto/blob/master/src/ie.js#files)

✔

Add support for Internet Explorer 10+ on desktop and Windows Phone 8.

[detect](https://github.com/madrobby/zepto/blob/master/src/detect.js#files)

[detect](https://github.com/madrobby/zepto/blob/master/src/detect.js#files)



Provides `$.os` and `$.browser` information

[fx](https://github.com/madrobby/zepto/blob/master/src/fx.js#files)



The `animate()` method

[fx_methods](https://github.com/madrobby/zepto/blob/master/src/fx_methods.js#files)



Animated `show`, `hide`, `toggle`, and
        `fade*()` methods.

[assets](https://github.com/madrobby/zepto/blob/master/src/assets.js#files)



Experimental support for cleaning up iOS memory after removing image
        elements from the DOM.

[data](https://github.com/madrobby/zepto/blob/master/src/data.js#files)



A full-blown `data()` method, capable of storing arbitrary
        objects in memory.

[deferred](https://github.com/madrobby/zepto/blob/master/src/deferred.js#files)



Provides `$.Deferred` promises API. Depends on the
        "callbacks" module. When included, [`$.ajax()`](#$.ajax)
        supports a promise interface for chaining callbacks.

[callbacks](https://github.com/madrobby/zepto/blob/master/src/callbacks.js#files)



Provides `$.Callbacks` for use in "deferred" module.

[selector](https://github.com/madrobby/zepto/blob/master/src/selector.js#files)



Experimental jQuery CSS support for functionality such as
        `$('div:first')` and `el.is(':visible')`.

[touch](https://github.com/madrobby/zepto/blob/master/src/touch.js#files)



Fires tap– and swipe–related events on touch devices. This works with
        both `touch` (iOS, Android) and `pointer` events (Windows Phone).

[gesture](https://github.com/madrobby/zepto/blob/master/src/gesture.js#files)



Fires pinch gesture events on touch devices

[stack](https://github.com/madrobby/zepto/blob/master/src/stack.js#files)



Provides `andSelf` & `end()` chaining methods

[ios3](https://github.com/madrobby/zepto/blob/master/src/ios3.js#files)



`String.prototype.trim` and
        `Array.prototype.reduce` methods (if they are missing) for
        compatibility with iOS 3.x.

There's also a [one-page app](http://github.e-sites.nl/zeptobuilder/) to do the
build for you.
