Merge pull request #6 from CartoDB/browserify_fixes

browserify fixes
pull/8/head
Raul Ochoa 10 years ago
commit bbfe3b3084

@ -3,6 +3,7 @@
#
expresso = ./node_modules/.bin/mocha
UGLIFYJS=./node_modules/.bin/uglifyjs
BROWSERIFY = ./node_modules/.bin/browserify
lint:
@ -22,6 +23,10 @@ dist:
mkdir -p dist
dist/carto.uncompressed.js: dist $(shell $(BROWSERIFY) --list lib/carto/index.js)
$(BROWSERIFY) --debug lib/carto/index.js --standalone carto > $@
$(BROWSERIFY) lib/carto/index.js --exclude node_modules/underscore/underscore.js --standalone carto > $@
dist/carto.js: dist/carto.uncompressed.js $(shell $(BROWSERIFY) --list lib/carto/index.js)
$(UGLIFYJS) dist/carto.uncompressed.js > $@
.PHONY: test

@ -1,6 +1,6 @@
var carto = exports,
tree = require('./tree'),
_ = require('underscore');
_ = global._ || require('underscore');
// Token matching is done with the `$` function, which either takes
// a terminal string or regexp, or a non-terminal function to call.

@ -1,4 +1,4 @@
var _ = require('underscore');
var _ = global._ || require('underscore');
var carto = require('./index');
carto.Renderer = function Renderer(env, options) {

@ -1,6 +1,6 @@
(function(carto) {
var tree = require('./tree');
var _ = require('underscore');
var _ = global._ || require('underscore');
function CartoCSS(style, options) {

@ -1,5 +1,5 @@
(function(tree) {
var _ = require('underscore');
var _ = global._ || require('underscore');
tree.Call = function Call(name, args, index) {
this.name = name;
this.args = args;

@ -1,6 +1,6 @@
(function(tree) {
var assert = require('assert'),
_ = require('underscore');
_ = global._ || require('underscore');
// A definition is the combination of a selector and rules, like
// #foo {

@ -1,5 +1,5 @@
(function(tree) {
var _ = require('underscore');
var _ = global._ || require('underscore');
//
// A number with a unit
//

@ -1,5 +1,5 @@
var tree = require('../tree');
var _ = require('underscore');
var _ = global._ || require('underscore');
tree.Filterset = function Filterset() {
this.filters = {};

@ -4,7 +4,7 @@
// combinations.
(function(tree) {
var _ = require('underscore'),
var _ = global._ || require('underscore'),
ref = {};
ref.setData = function(data) {

@ -1,5 +1,5 @@
(function(tree) {
var _ = require('underscore');
var _ = global._ || require('underscore');
// Given a style's name, attachment, definitions, and an environment object,
// return a stringified style for Mapnik

@ -9,7 +9,7 @@
},
"author": {
"name": "CartoDB",
"url": "http://cartodb.com/",
"url": "http://cartodb.com/"
},
"keywords": [
"maps",
@ -19,9 +19,9 @@
"contributors": [
"Tom MacWright <macwright@gmail.com>",
"Konstantin Käfer",
"Alexis Sellier <self@cloudhead.net>"
"Alexis Sellier <self@cloudhead.net>",
"Raul Ochoa <rochoa@cartodb.com>",
"Javi Santana <jsantana@cartodb.com>",
"Javi Santana <jsantana@cartodb.com>"
],
"licenses": [
{
@ -47,7 +47,8 @@
"sax": "0.1.x",
"istanbul": "~0.2.14",
"coveralls": "~2.10.1",
"browserify": "~7.0.0"
"browserify": "~7.0.0",
"uglify-js": "1.3.3"
},
"scripts": {
"pretest": "npm install",

Loading…
Cancel
Save