From 61e85e0d87a6ff6712b0803bd45fc7caa959f89a Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 8 Apr 2023 17:14:13 -0300 Subject: infra: log OK! message when content functions update --- src/content/dependencies/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/content/dependencies/index.js b/src/content/dependencies/index.js index f82062f7..d5ac082f 100644 --- a/src/content/dependencies/index.js +++ b/src/content/dependencies/index.js @@ -156,6 +156,11 @@ export function watchContentDependencies({ break main; } + if (logging && contentDependencies[functionName]) { + const timestamp = new Date().toLocaleString('en-US', {timeStyle: 'medium'}); + console.log(color.green(`[${timestamp}] Updated ${functionName}`)); + } + contentDependencies[functionName] = fn; events.emit('update', functionName); -- cgit 1.3.0-6-gf8a5