Do not open alternate buffer during piped --watch - #1574
Merged
Conversation
When executed in a child process, resetting the alternate buffer causes too much thrashing. - Added explicit ansi-escapes to devDependencies - Moved alternate buffer actions to separate file - Omits "waiting for changes..." message when piped
Contributor
Author
|
Holy cow, that AppVeyor build has been running for over 30 minutes on node 4. That's not ideal :/ |
This ensures that the alternate buffer is correctly closed, regardless of exit method. - Add signal-exit to devDependencies - Avoid hooking stdin 'end' event if stdin is _not_ piped - Remove all listeners during close()
evocateur
force-pushed
the
altscreen-optional
branch
from
August 24, 2017 19:14
3d9fa6a to
dc9a8fe
Compare
Contributor
|
aaaahhhh, that's much cleaner. Thank you 👍 |
Contributor
Author
|
Cheers!
… On Aug 27, 2017, at 14:30, Rich Harris ***@***.***> wrote:
aaaahhhh, that's much cleaner. Thank you 👍
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Recently, the output of
rollup --watchwas modified to reset the buffer when changes caused a rebuild. Works brilliantly when invoked in an active terminal, e.g.rollup -cw.However, this really doesn't play nicely with processes that pipe the output from a child process (such as
lerna exec), which is effectively a non-interactive terminal. Clearing the screen repeatedly causes a bunch of thrashing, as well as unwanted removal of other process logging.Tests?!
I was unable to locate examples of testing both CLI and watching, so I did a bunch of local testing with npm-linked rollup in several lerna repos where I was using rollup. Here's an example repo I whipped up that demonstrates the problem and solution:
https://github.com/evocateur/lerna-rollup-example