Demo 具体看附件资源
Merger.js
let path = require("path");
let fs = require("fs");
let worker = require("child_process");
// worker.execSync(`TortoiseProc.exe /command:update /path:E:/jiuzhou/client/trunk/xygame`);//调用svn
// worker.execSync(`svn update E:/jiuzhou/client/trunk/xygame`);
// let exe_path = 'D:/EgertFile/Egret/TextureMerger/TextureMerger.exe '; //合图
// let commod = exe_path + `-p ${path.resolve(__dirname,'hetu')} -o ${path.resolve(__dirname,'hetu.json')} -e`;//合该目录图
// let commod = exe_path + `-p ${path.resolve(__dirname, 'hetu/a.jpg')} ${path.resolve(__dirname, 'hetu/asd.jpg')} -o ${path.resolve(__dirname, 'hetu.json')} -e`;//合指定文件图
// console.log(path.resolve(__dirname, 'hetu'));
// worker.execSync(commod);
//删除目录所有文件
function delDir(dir_name) {
dirPath = path.resolve(__dirname, di