-
Notifications
You must be signed in to change notification settings - Fork 49
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
npm output / logging follow up tasks #829
Comments
From #810 (comment) Customizable colors
Our goal is to have one (1) good and accessible color palette for all output shown to the terminal. BUT if we find cases where that is impossible (eg dark vs light terminal backgrounds) it is now at least possible to have a config option to change colors. |
From #810 (comment) Command templatesWhat if a command could do this? // producer
const data = { name, version }
output.standard(data, {
templates: {
// pick any templating DSL
human: `{{ name }}@{{ version }}`,
parseable: `{{ name }}\t{{ version }}`
}
})
// consumer
process.on('output', (level, data, { templates }) => {
if (level === 'standard') {
const templateName = templates[this.human ? 'human' : this.parseable : 'parseable' : '']
process.stdout.write(template(data, templateName || JSON.stringify))
}
}) |
Epic
This is a follow up to #810
Tasks
The text was updated successfully, but these errors were encountered: