From 98133431c801a823f3430b0e178c56350e12622c Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Mon, 21 Aug 2023 22:14:34 -0300 Subject: write: static-build: gently log failed content functions & continue --- src/util/cli.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/util/cli.js') diff --git a/src/util/cli.js b/src/util/cli.js index f83c8061..e8c8c79f 100644 --- a/src/util/cli.js +++ b/src/util/cli.js @@ -334,7 +334,9 @@ export function progressCallAll(msgOrMsgFn, array) { export function fileIssue({ topMessage = `This shouldn't happen.`, } = {}) { - console.error(color.red(`${topMessage} Please let the HSMusic developers know:`)); + if (topMessage) { + console.error(color.red(`${topMessage} Please let the HSMusic developers know:`)); + } console.error(color.red(`- https://hsmusic.wiki/feedback/`)); console.error(color.red(`- https://github.com/hsmusic/hsmusic-wiki/issues/`)); } -- cgit 1.3.0-6-gf8a5 From eb00f2993a1aaaba171ad6c918656552f80bb748 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 7 Sep 2023 12:38:34 -0300 Subject: data: import Thing.common utilities directly Also rename 'color' (from #cli) to 'colors'. --- src/util/cli.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/util/cli.js') diff --git a/src/util/cli.js b/src/util/cli.js index e8c8c79f..9f2b35ab 100644 --- a/src/util/cli.js +++ b/src/util/cli.js @@ -17,7 +17,7 @@ export const ENABLE_COLOR = const C = (n) => ENABLE_COLOR ? (text) => `\x1b[${n}m${text}\x1b[0m` : (text) => text; -export const color = { +export const colors = { bright: C('1'), dim: C('2'), normal: C('22'), -- cgit 1.3.0-6-gf8a5 From 19b6cbd1cde35399c0ecdee5459c5a4946e84299 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Fri, 8 Sep 2023 08:40:03 -0300 Subject: util: fix missing color -> colors rename in cli utils --- src/util/cli.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/util/cli.js') diff --git a/src/util/cli.js b/src/util/cli.js index 9f2b35ab..4c08c085 100644 --- a/src/util/cli.js +++ b/src/util/cli.js @@ -335,8 +335,8 @@ export function fileIssue({ topMessage = `This shouldn't happen.`, } = {}) { if (topMessage) { - console.error(color.red(`${topMessage} Please let the HSMusic developers know:`)); + console.error(colors.red(`${topMessage} Please let the HSMusic developers know:`)); } - console.error(color.red(`- https://hsmusic.wiki/feedback/`)); - console.error(color.red(`- https://github.com/hsmusic/hsmusic-wiki/issues/`)); + console.error(colors.red(`- https://hsmusic.wiki/feedback/`)); + console.error(colors.red(`- https://github.com/hsmusic/hsmusic-wiki/issues/`)); } -- cgit 1.3.0-6-gf8a5