Skip to content

Commit

Permalink
Removing compression option for now
Browse files Browse the repository at this point in the history
  • Loading branch information
twolfson committed Jul 29, 2015
1 parent 7a1c629 commit 0880986
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions tasks/zip.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,15 @@ module.exports = function(grunt) {
});

// For each of the srcFiles
var useUnixPermissions = data.useUnixPermissions;
srcFiles.forEach(function (filepath) {
// Read in the content and add it to the zip
var input = fs.readFileSync(filepath),
inputStats = useUnixPermissions ? fs.statSync(filepath) : null,
routedPath = router(filepath);

// If it has a path, add it (allows for skipping)
if (routedPath) {
grunt.verbose.writeln('Adding file: "' + filepath + '" -> "' + routedPath + '"');
zip.file(routedPath, input, {
unixPermissions: useUnixPermissions ? inputStats.mode : null
});
zip.file(routedPath, input);
}
});

Expand All @@ -94,11 +90,7 @@ module.exports = function(grunt) {
grunt.file.mkdir(destDir);

// Write out the content
var output = zip.generate({
type: 'nodebuffer',
compression: data.compression,
platform: useUnixPermissions ? 'UNIX' : 'DOS'
});
var output = zip.generate({type: 'nodebuffer', compression: data.compression});
fs.writeFileSync(dest, output);

// Fail task if errors were logged.
Expand Down Expand Up @@ -164,7 +156,6 @@ module.exports = function(grunt) {
// Write out the content
grunt.verbose.writeln('Writing file: "' + filepath + '"');
grunt.file.mkdir(fileDir);
console.log('wat', fileObj.unixPermissions, fileObj);
fs.writeFileSync(filepath, content, {mode: fileObj.unixPermissions});
}
}
Expand Down

0 comments on commit 0880986

Please sign in to comment.