Skip to content

Instantly share code, notes, and snippets.

@justinhernandez
Created March 25, 2015 16:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justinhernandez/fd9e064fb88fb77cd3f8 to your computer and use it in GitHub Desktop.
Save justinhernandez/fd9e064fb88fb77cd3f8 to your computer and use it in GitHub Desktop.
var fs = require('fs');
var base = '../vagabond';
var dirs = fs.readdirSync(base);
var _ = require('lodash');
var archiver = require('archiver');
_.each(dirs, function(dir){
var archive = archiver('zip', { zlib: { level: 9 } });
var output = fs.createWriteStream('../zips/vagabond-' + dir + '.cbz');
archive.pipe(output);
archive.directory(base + '/' + dir).finalize();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment