H5发行打包完成后自动打开输出目录
This commit is contained in:
@@ -263,6 +263,15 @@ class VersionInjectPlugin {
|
||||
try {
|
||||
execSync(command, { stdio: 'inherit' });
|
||||
console.log(`✅ H5 ZIP: ${zipFileName}`);
|
||||
|
||||
// 打包成功后默认打开输出目录
|
||||
const openDir = h5Dir.replace(/'/g, "''");
|
||||
if (process.platform === 'win32') {
|
||||
execSync(`explorer "${openDir}"`, { stdio: 'ignore' });
|
||||
} else {
|
||||
execSync(`open "${openDir}"`, { stdio: 'ignore' });
|
||||
}
|
||||
|
||||
// 删除已打包的源目录
|
||||
// fs.rmSync(targetDir, { recursive: true, force: true });
|
||||
// console.log(`[H5Zip] 已删除源目录: ${outputDirName}`);
|
||||
|
||||
Reference in New Issue
Block a user