Skip to content

Commit

Permalink
feat: add date to build logs
Browse files Browse the repository at this point in the history
  • Loading branch information
logaretm committed Nov 23, 2024
1 parent 4a937c3 commit b24384f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions scripts/watch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ const formats: ModuleFormat[] = ['es', 'iife', 'cjs'];

watcher.on('change', async (file, { event }) => {
if (event === 'update') {
consola.info(`📦 ${file} changed, rebuilding...`);
info(`📦 ${file} changed, rebuilding...`);
}
if (event === 'create') {
consola.info(`📦 ${file} created, rebuilding...`);
info(`📦 ${file} created, rebuilding...`);
}
if (event === 'delete') {
consola.info(`📦 ${file} deleted, rebuilding...`);
info(`📦 ${file} deleted, rebuilding...`);
}

const pkgRE = /packages\/([^/]+)\//;
Expand All @@ -71,3 +71,10 @@ const formats: ModuleFormat[] = ['es', 'iife', 'cjs'];
}
});
})();

function info(message: string) {
consola.info({
message,
date: new Date(),
});
}

0 comments on commit b24384f

Please sign in to comment.