-
Notifications
You must be signed in to change notification settings - Fork 449
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
colors.color(string) not working when using with Grunt #102
Comments
Since, the stdout is not a TTY, colors will be disabled. Check the code here. I assume that grun takes the output from colors and then prints it. You must use |
@pksunkara - You should review the code path for supports colors and https://github.com/Marak/colors.js/blob/master/lib/extendStringPrototype.js to ensure that colors support is being correctly applied to both APIs. It would also be good to add test coverage for this. |
I actually merged a fix related to this in #97 |
@mgingras Related to what @Marak was saying, both the stringPrototype and the normal api works the same now, both shouldn't be printing colors now. I guess my first comment can be confusing without this context. So, if you want colors to be printed for either of the api, you need to use the |
Running a nodejs application through Grunt I noticed that strings colored using color(string) were not colored, however, by using string.color the color was picked up.
The text was updated successfully, but these errors were encountered: