Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: more visually distinct log for url transformation #563

Merged
merged 6 commits into from
Feb 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: use gray over dim
some terminals like konsole doesn't support dim escape code.

Co-authored-by: Oscar Otero <oom@oscarotero.com>
  • Loading branch information
scarf005 and oscarotero committed Feb 4, 2024
commit f9b39b92c8571b92189299244f6780187adf18c9
3 changes: 2 additions & 1 deletion core/utils/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
bold,
brightGreen,
cyan,
gray,
dim,
red,
strikethrough,
Expand Down Expand Up @@ -71,7 +72,7 @@ const logFormats: Record<string, (str: string) => string> = {
Cyan: (str: string) => bold(cyan(str)),
red,
Red: (str: string) => bold(red(str)),
bold,
gray,
dim,
Dim: (str: string) => bold(dim(str)),
green: brightGreen,
Expand Down
2 changes: 1 addition & 1 deletion core/writer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export class FSWriter implements Writer {
}
}

log.info(`🔥 ${page.data.url} <dim>${sourcePath}</dim>`);
log.info(`🔥 ${page.data.url} <- <gray>${sourcePath}</gray>`);

const filename = posix.join(this.dest, page.outputPath);
await ensureDir(posix.dirname(filename));
Expand Down