Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to only show subtasks on failure #10

Closed
sindresorhus opened this issue Jul 10, 2016 · 4 comments
Closed

Option to only show subtasks on failure #10

sindresorhus opened this issue Jul 10, 2016 · 4 comments

Comments

@sindresorhus
Copy link

In np we have a Git task with some subtasks. Those subtasks finish quickly so the whole thing feels very jumpy. It would be nice if we could just not show them at all, but show in case of a failure.

@SamVerschueren
Copy link
Owner

Good idea!

@SamVerschueren
Copy link
Owner

Looking into implementing this. Shouldn't be that hard. Did you have an option name in mind?

I was thinking something like this:

const tasks = new Listr(taskList);

Or if you want to hide the subtasks

const tasks = new Listr({subtask: false}, taskList);

While typing this, I came up with another approach. It's more pageres like which might be cleaner.

const tasks = new Listr(taskList)
    .renderSubtasks(false)
    .run();

// @jamestalmage

@sindresorhus
Copy link
Author

sindresorhus commented Jul 20, 2016

I would go with:

const tasks = new Listr(taskList, {showSubtasks: false});

(Options at the end).

I don't like the Pageres approach. Would not have done that again.

@SamVerschueren
Copy link
Owner

Thanks!

subtasks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants