npm-watch icon indicating copy to clipboard operation
npm-watch copied to clipboard

fix how `prefix` is inserted into output

Open alxndr opened this issue 8 years ago • 4 comments

The line can be a multiline string. This commit changes how the prefix is inserted to use a multiline regular expression instead of prepending one to line.

Fix for the bug reported in #17


This change is Reviewable

alxndr avatar Apr 18 '16 17:04 alxndr

Hrm, now I'm seeing double-prefixes...

screen shot 2016-04-18 at 10 20 10

alxndr avatar Apr 18 '16 17:04 alxndr

Ping on the issue of seeing double [test].

M-Zuber avatar Jul 12 '16 15:07 M-Zuber

The issue was related to https://github.com/mochajs/mocha/pull/2401. I implemented a more complete fix, but will only be able to push it up tomorrow or after the weekend

M-Zuber avatar Jul 28 '16 22:07 M-Zuber

So basically after fighting with this a whole bunch, it would seem that our options are either no new lines, or extra ones at random spots due to pauses in piping. Personally I feel lack of white space is less of an issue - but I would then make it opt-in and have the default use quite (thanks to you @alxndr :smile: ) or inherit #22 Exhibit A image

Do you have any thoughts on this?

M-Zuber avatar Aug 15 '16 21:08 M-Zuber