Closed Fuco1 closed 2 years ago
This does not solve all possible cases, but is it possible to run webpack with another output format?
I imagine it's not only webpack which does this though. Ideally I would like it to interpret all the control sequences (a la ansi-term
but that seems incredibly difficult to make reliable outside of actually running a term
It would definitely be optimal yes. The part of ansi-term that does this could probably be a mode in itself so it could be used elsewhere, here for example.
Note to self: we can try to repurpose or copy/change the function term-handle-ansi-escape
which seems to handle the ansi movements. I think reuse is virtually impossible because of how the term mode operates (there is no scrollback, inplace mod etc.)
I'm closing all old PRs. If you still care, please rebase your branch and reopen the PR.
Tools like webpack print a lot of
^H
into the output to simulate the "update-in-place" effect in the terminal. This litters the prodigy buffer with thousands of lines of crap.I've added a bit of code to "interpret" the
^H
as a "delete one char back". The implementation I don't quite like because:output
inprodigy-process-output
).Maybe we can introduce a new hook variable that would work directly on the log buffer instead of only on the chunks and start placing these functions there.
I've tried to make use of
term
which would be super cool but it is quite rigid in how its implemented and seems that hacking it to somehow be usable as a generic filter is quite impossible, so we might need to implement bits and pieces ourselves.I'm opening this up for discussion/design decisions.