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

2018-05-08  本文已影响18人  Armin0202

将目录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`);
  }
});
上一篇下一篇

猜你喜欢

热点阅读