Closed Raynos closed 11 years ago
Ironically, that's precisely what they're currently used for:
core => white node_modules in path => teal other (application code) => red
@CrabBot the reason it's confusing is that my tool prints stderr
in red so both core and other are red which is what's confusing me. I don't know which tool should stop using the color red >_<
That's a decent point. it would need a better alternative though. Currently it makes sense if you think about it. Red stands out the most and is the color you care most about. These stack traces are error stack traces, so red is applicable. White is used for core since it's a neutral color implying nothing, and teal for node_modules b/c it's easily ignored and is often the code you care the least about.
@CrabBot I think the force node core to be white with the else
statement is a good tradeoff.
@CrabBot what do you think about adding a matcher for /test/
and /tests/
so that I can distinguish test statements and source code code statements
Perhaps making this configurable would be the best route by providing a regex and a color. We have a process running ongoing tests called "test", which would effectively color all its "red" to "?"
Will the new configure format work for this?
trycatch.configure({
format: function(line) {
// Alter the final output
// return falsy value to remove
return line
}
})
Closing, feel free to reopen and/or submit a PR if this doesn't address your need.
They look random.
Can we use them for something useful like differentiating node core, node_modules and my source code.