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

stylized console logging for development and production builds #1393

Open
thescientist13 opened this issue Jan 19, 2025 · 0 comments
Open

stylized console logging for development and production builds #1393

thescientist13 opened this issue Jan 19, 2025 · 0 comments
Labels
CLI enhancement Improve something existing (e.g. no docs, new APIs, etc) good first issue Good for newcomers
Milestone

Comments

@thescientist13
Copy link
Member

Type of Change

Enhancement

Summary

It would be nice to get some stylized console log coloring for supported terminals to better help distinguish normal console logs from warning or errors.

For example, especially when logging out warning from the import map generator, coloring these in yellow would be nice.

Image

Details

I think it would be great to create some logging utilities with some pre-defined methods we can use to provide pre-stylized text

  • logLog - basically the same as just normal console.log output
  • logWarn - uses console.warn but with yellow / amber colored text
  • logError - uses console.error but with red text
  • logSuccess - - uses console.log but with green text (to signify the completion of key tasks within Greenwood on a case by case basis)

I would say we could use NodeJS styleText but it is only in >= 22.x it seems, so we might have to manually do it for now. This guide has some suggestions using ANSI colors (I don't think we nee to use any dependencies for this).

@thescientist13 thescientist13 added CLI enhancement Improve something existing (e.g. no docs, new APIs, etc) good first issue Good for newcomers labels Jan 19, 2025
@thescientist13 thescientist13 added this to the 1.0 milestone Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI enhancement Improve something existing (e.g. no docs, new APIs, etc) good first issue Good for newcomers
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant