We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8bce035 commit 5000192Copy full SHA for 5000192
nodejs/copyDist.js
@@ -38,14 +38,14 @@ const copyFiles = (srcDir, destDir) => {
38
const destPath = path.join(destDir, entry.name);
39
40
if (entry.isDirectory()) {
41
- // Create directory if it doesn't exist
+ // 如果目录不存在,则创建该目录
42
if (!fs.existsSync(destPath)) {
43
fs.mkdirSync(destPath);
44
}
45
- // Recursively copy files
+ //递归复制文件
46
copyFiles(srcPath, destPath);
47
} else {
48
- // Copy file and overwrite if exists
+ // 复制文件并覆盖(如果存在)
49
fs.copyFileSync(srcPath, destPath);
50
console.log(`Copied: ${srcPath} -> ${destPath}`);
51
0 commit comments