Blob Blame History Raw
From 1b0d94ebf7d14c90c24022720ced6d21bcbac75d Mon Sep 17 00:00:00 2001
From: Jamie Nguyen <j@jamielinux.com>
Date: Thu, 8 May 2014 19:22:29 +0100
Subject: [PATCH] Remove use of gzip-size

---
 index.js     | 3 +--
 package.json | 1 -
 test.js      | 2 +-
 3 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/index.js b/index.js
index b764ac9..4bc7a29 100644
--- a/index.js
+++ b/index.js
@@ -1,5 +1,4 @@
 'use strict';
-var gzipSize = require('gzip-size');
 var prettyBytes = require('pretty-bytes');
 var chalk = require('chalk');
 
@@ -15,7 +14,7 @@ module.exports = function (max, min, useGzip) {
 	var ret = format(max.length) + ' → ' + format(min.length);
 
 	if (useGzip === true) {
-		ret += ' → ' + format(gzipSize.sync(min)) + chalk.gray(' (gzip)');
+		ret += ' → ' + chalk.gray('(gzip-size unavailable)');
 	}
 
 	return ret;
diff --git a/package.json b/package.json
index b1ab90c..859a770 100644
--- a/package.json
+++ b/package.json
@@ -35,7 +35,6 @@
   },
   "dependencies": {
     "chalk": "^0.4.0",
-    "gzip-size": "^0.2.0",
     "pretty-bytes": "^0.1.0"
   }
 }
diff --git a/test.js b/test.js
index 4cf16c6..0b495d5 100644
--- a/test.js
+++ b/test.js
@@ -8,5 +8,5 @@ var min = 'function smoothRangeRandom(b,c){var a=Math.floor(Math.random()*(c-b+1
 
 it('should generate correct output', function () {
 	assert.strictEqual(chalk.stripColor(maxmin(max, min)), '390 B → 334 B');
-	assert.strictEqual(chalk.stripColor(maxmin(max, min, true)), '390 B → 334 B → 120 B (gzip)');
+	assert.strictEqual(chalk.stripColor(maxmin(max, min, true)), '390 B → 334 B → gzip-size unavailable');
 });
-- 
1.9.0