gongchunyi
8 天以前 a798cdaa46f693eebabec6d999bfe32d055f4c48
multiple/multiple-build.js
@@ -60,7 +60,9 @@
    const backupFile = path.join(replacePath, config[key]);
    const replaceFile = path.join(resourcePath, companyMap[key]);
    if (fsSync.existsSync(originFile)) {
    await copyFileWithOverwrite(originFile, backupFile);
    }
    await copyFileWithOverwrite(replaceFile, originFile);
  }
@@ -82,8 +84,10 @@
      const originFile = path.join(rootPath, config[key]);
      const backupFile = path.join(replacePath, config[key]);
      if (fsSync.existsSync(backupFile)) {
      await copyFileWithOverwrite(backupFile, originFile);
    }
    }
    await fs.rm(replacePath, { recursive: true, force: true });
    console.log(`🗑️ 已删除 ${replacePath}`);
  }