« get me outta code hell

infra: log OK! message when content functions update - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-04-08 17:14:13 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-04-08 17:14:13 -0300
commit61e85e0d87a6ff6712b0803bd45fc7caa959f89a (patch)
treec36927757a22797cee297b8a5c71683d20f1626c /src/content/dependencies
parent776abf8d697716902692f357c6f179c1e681369f (diff)
infra: log OK! message when content functions update
Diffstat (limited to 'src/content/dependencies')
-rw-r--r--src/content/dependencies/index.js5
1 files changed, 5 insertions, 0 deletions
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);