2018-05-08 js压缩打包目录

将目录src压缩打包到2017-fund-account-binding.zip

var shell = require('shelljs');
var zipFolder = require('zip-folder');

var sourceFileName = 'src'
var targetFileName = '2017-fund-account-binding.zip'

shell.rm('-rf', targetFileName);
console.log(`rm -rf ${targetFileName}\n`);

zipFolder(sourceFileName, targetFileName, function (err) {
  if (err) {
    console.log('oh no!', err);
  } else {
    console.log(`zip: ${sourceFileName} -> ${targetFileName}\n`);
  }
});

你可能感兴趣的:(2018-05-08 js压缩打包目录)