Skip to content

Create build-nodejs.yml #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 12 commits into from
Prev Previous commit
Next Next commit
Update copyDist.js
  • Loading branch information
ne7359 authored Jan 18, 2025
commit 50001924fa26e492f733538571dd2be35cb8951c
6 changes: 3 additions & 3 deletions nodejs/copyDist.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ const copyFiles = (srcDir, destDir) => {
const destPath = path.join(destDir, entry.name);

if (entry.isDirectory()) {
// Create directory if it doesn't exist
// 如果目录不存在,则创建该目录
if (!fs.existsSync(destPath)) {
fs.mkdirSync(destPath);
}
// Recursively copy files
//递归复制文件
copyFiles(srcPath, destPath);
} else {
// Copy file and overwrite if exists
// 复制文件并覆盖(如果存在)
fs.copyFileSync(srcPath, destPath);
console.log(`Copied: ${srcPath} -> ${destPath}`);
}
Expand Down