Skip to content

Commit

Permalink
Swapped out adm-zip with node-zip since it was also broken
Browse files Browse the repository at this point in the history
  • Loading branch information
spocke committed Apr 12, 2013
1 parent 251bac2 commit d4087d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"jshint": ">= 0.9.1",
"uglify-js": ">= 2.0.0",
"glob": ">= 3.1.12",
"adm-zip": ">= 0.4.3",
"node-zip": ">= 1.0.1",
"less": ">= 1.3.1"
}
}
8 changes: 4 additions & 4 deletions tools/BuildTools.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ exports.jshint = function (options) {
};

exports.zip = function (options) {
var AdmZip = require('adm-zip');
var AdmZip = require('node-zip');
var archive = new AdmZip();

function process(filePath, zipFilePath) {
Expand Down Expand Up @@ -305,15 +305,15 @@ exports.zip = function (options) {
}

if (stat.isFile()) {
var data = fs.readFileSync(filePath);
var data = fs.readFileSync(filePath, 'binary');

if (options.dataFilter) {
args = {filePath: filePath, zipFilePath: zipFilePath, data: data};
options.dataFilter(args);
data = args.data;
}

archive.addFile(path.join(options.baseDir, zipFilePath), data);
archive.file(path.join(options.baseDir, zipFilePath), data);
} else if (stat.isDirectory()) {
fs.readdirSync(filePath).forEach(function(fileName) {
process(path.join(filePath, fileName), path.join(zipFilePath, fileName));
Expand All @@ -331,7 +331,7 @@ exports.zip = function (options) {
}
});

archive.writeZip(options.to);
fs.writeFileSync(options.to, archive.generate({base64: false, compression: 'DEFLATE'}), 'binary');
};

exports.compileAmd = function (options) {
Expand Down

0 comments on commit d4087d5

Please sign in to comment.