Np: Use `inherit` option so child process stuff is piped to console in real time.

Created on 7 Jun 2016  路  10Comments  路  Source: sindresorhus/np

execa should honor the inherit option (if not, it should).

It's annoying not to be able to see what is happening.

enhancement help wanted

Most helpful comment

Yes it's really annoying. Sometimes it looks like it's hanging but it's just installing the npm dependencies. Another option would be to show a checklist and use log-update to mark "tasks" as completed.

  • [ ] Installing dependencies
  • [ ] Running tests
  • [ ] Update version
  • [ ] Publishing package
  • [ ] Pushing tags

We could also use elegant-spinner in front of the task it is executing to indicate it is busy.

So after installing the dependencies and running the tests, the list would off course look like

  • [x] Installing dependencies
  • [x] Running tests
  • [ ] Update version
  • [ ] Publishing package
  • [ ] Pushing tags

It's just a suggestion to create a nice looking UX.

All 10 comments

馃憤

Yes it's really annoying. Sometimes it looks like it's hanging but it's just installing the npm dependencies. Another option would be to show a checklist and use log-update to mark "tasks" as completed.

  • [ ] Installing dependencies
  • [ ] Running tests
  • [ ] Update version
  • [ ] Publishing package
  • [ ] Pushing tags

We could also use elegant-spinner in front of the task it is executing to indicate it is busy.

So after installing the dependencies and running the tests, the list would off course look like

  • [x] Installing dependencies
  • [x] Running tests
  • [ ] Update version
  • [ ] Publishing package
  • [ ] Pushing tags

It's just a suggestion to create a nice looking UX.

@SamVerschueren Good idea!

Instead of elegant-spinner, I would like to see the most recent line / lines of the child process.

why-not-both

Yeah sure.

Nothing npm prints is very useful. E.g. while I do care about my dependency tree, at install time I don't give a damn what the sub-sub-sub dependencies are of my dependencies. And I am never going to read that.

Man I need that checklist with a spinner in my life.

Did the first step already: https://github.com/SamVerschueren/listr. Have implemented it in np and will do a PR one of the following days.

The only reason I want what npm prints, is to know if it has hung.

The progress bar is nice as well.

Also, when I'm installing something that has a long build step as part of it's install (i.e. phantomjs-prebuilt), I want to see what's causing the hold up.

I added some quick logging in the meantime: https://github.com/sindresorhus/np/commit/445924f6ed6c0876d4bc22e30183a749897c8163 (@Hypercubed fyi)

And a new version is out :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dotconnor picture dotconnor  路  4Comments

fregante picture fregante  路  5Comments

natesilva picture natesilva  路  5Comments

jescalan picture jescalan  路  3Comments

nickthesing picture nickthesing  路  5Comments