From 2631c928b7d6c85240312ea2bd845b4894a1a27d Mon Sep 17 00:00:00 2001 From: Francisco Dans Date: Mon, 19 Jan 2015 14:29:11 +0100 Subject: [PATCH] adds Makefile to produce uncompressed and minified dists --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 81cb453..c5e9013 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,13 @@ expresso = ./node_modules/.bin/mocha UGLIFYJS=./node_modules/.bin/uglifyjs BROWSERIFY = ./node_modules/.bin/browserify +dist/carto.js: dist/carto.uncompressed.js $(shell $(BROWSERIFY) --list lib/carto/index.js) + $(UGLIFYJS) dist/carto.uncompressed.js > $@ + +dist/carto.uncompressed.js: dist $(shell $(BROWSERIFY) --list lib/carto/index.js) + $(BROWSERIFY) lib/carto/index.js --exclude node_modules/underscore/underscore.js --standalone carto > $@ + + lint: ./node_modules/.bin/jshint lib/carto/*.js lib/carto/tree/*.js @@ -22,11 +29,7 @@ check: test dist: mkdir -p dist -dist/carto.uncompressed.js: dist $(shell $(BROWSERIFY) --list lib/carto/index.js) - $(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