From c13eb838903faf30a0fcba1ccccdd888e0b2198e Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Mon, 24 Mar 2014 14:34:22 +0000 Subject: Use jszip from npm --- browser/unzip.js | 2 ++ makefile | 12 +----------- package.json | 3 ++- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/browser/unzip.js b/browser/unzip.js index 7763bdd..50cbf28 100644 --- a/browser/unzip.js +++ b/browser/unzip.js @@ -1,3 +1,5 @@ +var JSZip = require("jszip"); + var promises = require("../lib/promises"); exports.openZip = openZip; diff --git a/makefile b/makefile index 6088d40..70e4f0a 100644 --- a/makefile +++ b/makefile @@ -3,23 +3,13 @@ test: npm test -setup: npm-install static/jszip mammoth.browser.min.js +setup: npm-install mammoth.browser.min.js npm-install: npm install -static/jszip: - mkdir -p _build/jszip - curl -L https://github.com/Stuk/jszip/archive/v1.0.1.tar.gz | tar xz --directory _build/jszip --strip-components 1 - mkdir -p static/jszip - cp _build/jszip/*.js static/jszip - mammoth.browser.js: rm $@ -f - cat static/jszip/jszip.js >> $@ - cat static/jszip/jszip-deflate.js >> $@ - cat static/jszip/jszip-inflate.js >> $@ - cat static/jszip/jszip-load.js >> $@ node_modules/.bin/node-license-sniffer . --recurse --js-comment >> $@ node_modules/.bin/browserify lib/index.js --standalone mammoth >> $@ diff --git a/package.json b/package.json index 9257826..ae58163 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,8 @@ "async": "~0.2.6", "buffers": "~0.1.1", "stream-buffers": "~0.2.4", - "nomnom": "~1.6.2" + "nomnom": "~1.6.2", + "jszip": "~2.2.0" }, "devDependencies": { "mocha": "~1.8", -- cgit v1.2.3