Skip to content

Commit 5000192

Browse files
authored
Update copyDist.js
1 parent 8bce035 commit 5000192

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

nodejs/copyDist.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ const copyFiles = (srcDir, destDir) => {
3838
const destPath = path.join(destDir, entry.name);
3939

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

0 commit comments

Comments
 (0)