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

Allow to define an update message in a template with arguments #176

Closed
jarrodek opened this issue Jan 15, 2020 · 0 comments · Fixed by #175
Closed

Allow to define an update message in a template with arguments #176

jarrodek opened this issue Jan 15, 2020 · 0 comments · Fixed by #175

Comments

@jarrodek
Copy link

I understand that I can pass the message argument to the notify() function. However I would like to specify a slightly different message but keep the original formatting. Right now I have to install chalk, import it, and construct own message.
It would be nice to have to be able to specify message option as a template with variables that are processed internally without me having to import chalk and work with notifier.update variables.

An example:

notifier.notify({
    message: `Update available {current} → {latest}
Run {command} to update.

My custom message.`
});

It's not really a big deal to format the message by myself but that would save some time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant