Skip to content

Commit a802e2c

Browse files
committed
log build time
1 parent 78d11e4 commit a802e2c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/build.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ const _buildHtml = async (file) => {
4747
};
4848

4949
const build = async ({ directories }) => {
50+
const p = performance.now();
5051
await Promise.all(directories.map((dir) => mkdir(`dist/${dir}`, _fs)));
5152
await cp("assets", "dist/assets", _fs);
5253
const promises = [];
@@ -57,8 +58,7 @@ const build = async ({ directories }) => {
5758
promises.push(_buildHtml(file));
5859
}
5960
await Promise.all(promises);
60-
61-
console.log("Done.");
61+
console.log(`\x1b[36mDone. Took ${performance.now() - p} ms.\x1b[39m`);
6262
};
6363

6464
const normalize = (file) => file.replace(/\\/g, "/");

0 commit comments

Comments
 (0)