Advertisement
Guest User

Untitled

a guest
May 2nd, 2016
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. var archive = archiver('zip');
  2. var output = fs.createWriteStream(projectName + '.zip');
  3. archive.pipe(output);
  4.  
  5. archive.on('error', function(err) {
  6. throw err;
  7. });
  8. output.on('close', function() {
  9. console.log('Package complete!');
  10. });
  11. archive.bulk([
  12. {expand: true, cwd: projectPath, src:['**/*'], data: {mode: 0755}}
  13. ]).finalize();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement