将目录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`);
}
});
网友评论