dylang / observatory

Beautiful UI for showing tasks running on the command line.
https://npmjs.org/package/observatory
MIT License
278 stars 17 forks source link

Simplify the createTask closure #9

Open rstacruz opened 9 years ago

rstacruz commented 9 years ago

Just saw an opportunity to write this function more succinctly.

dylang commented 8 years ago

I just learned about https://github.com/rstacruz/pnpm from Sindre Sorhus and now I want to get your PR in and any other fixes you require. :smile:

I can't get this one in tonight but hopefully soon.

rstacruz commented 8 years ago

haha, you found pnpm, cool :)

rstacruz commented 8 years ago

speaking of so, pnpm has a problem that observatory can't edit lines that are outside the viewport. it uses require('ansi-escapes').cursorUp(20), which i think should be better written as process.stdout.moveCursor(0, -20).

dylang commented 8 years ago

cool, I feel like process.stdout.moveCursor wasn't in node when this was created.

does it handle negative (outside of the viewable area) well?

rstacruz commented 8 years ago

apparently not :\ see the other issue about it