Skip to content

Commit 71e8a27

Browse files
committed
feat: add Logger utility for controlled console output
- Introduced a Logger class to manage logging behavior based on the environment (production or development). - Replaced console.log, console.warn, and console.error calls throughout the codebase with Logger methods to ensure consistent logging. - Updated various modules including main.ts, markdown-it-image-plugin.ts, oauth2-client.ts, and others to utilize the new Logger class for improved logging practices.
1 parent 60400c6 commit 71e8a27

13 files changed

Lines changed: 118 additions & 83591 deletions

esbuild.config.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ const context = await esbuild.context({
3737
logLevel: "info",
3838
sourcemap: prod ? false : "inline",
3939
treeShaking: true,
40+
minify: prod,
41+
define: {
42+
"process.env.NODE_ENV": prod ? '"production"' : '"development"'
43+
},
4044
outfile: "main.js",
4145
});
4246

0 commit comments

Comments
 (0)