Skip to content

Commit 80dcffb

Browse files
committed
Format JS script
1 parent 1216843 commit 80dcffb

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

copy-static-files.js

+10-8
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,19 @@ async function copyFiles(sourceDir, targetDir) {
2020

2121
const files = await fs.readdir(sourceDir);
2222

23-
await Promise.all(files.map(async (file) => {
24-
const sourcePath = path.join(sourceDir, file);
25-
const targetPath = path.join(targetDir, file);
23+
await Promise.all(
24+
files.map(async (file) => {
25+
const sourcePath = path.join(sourceDir, file);
26+
const targetPath = path.join(targetDir, file);
2627

27-
await fs.copyFile(sourcePath, targetPath);
28-
console.log(`Copied ${file} to ${targetPath}`);
29-
}));
28+
await fs.copyFile(sourcePath, targetPath);
29+
console.info(`Copied ${file} to ${targetPath}`);
30+
}),
31+
);
3032

31-
console.log('All files copied successfully');
33+
console.info("All files copied successfully");
3234
} catch (error) {
33-
console.error('An error occurred:', error.message);
35+
console.error("An error occurred:", error.message);
3436
process.exit(1);
3537
}
3638
}

0 commit comments

Comments
 (0)