mapbox/carto — pull request #379 by javisantana (2014-12-04 15:32:11+00:00)
Title: adds support for browserify

adds support for browserify, the final javascript file can be generated using make target:

```
make dist/carto.uncompressed.js
```

It exposes the global variable "carto" so can be used in the browser like:

```
carto.Parser().parse('#test { marker-fill: #F00; }')
```

One of the problems is mapnik reference, the module is not read to work with browserify since it loads modules dynamically. It does not make sense to make it compatible since mapnik-reference is not going to be used so people must to set the reference needed before parse/render:

carto.tree.Reference.setData(reference)

this PR also changes some code to make compatible with the browser.