-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
Add option to display only name and description for help command #119
Comments
Thanks. Definitely open to doing this. Just unsure of what's best. I think I like using hiddenFromHelp, but what does everyone else think? |
For me, I like this idea because I like using What about just adding a built-in nps command called "commands" or a flag? I guess you might be worried about name conflicts though. But this way you could just make your script:
|
What if it was just |
Well if it's going to be based off of
The idea being I know how to use nps, I just forgot the name of the script, but I'll know it when I see it? |
Good point! |
Piggybacking on this idea, can we also include a way to hide the script output when executing [PREFIX] nps is executing `task`: <script displayed here and could be
really looooong spanning multiple lines>
[PREFIX] nps is executing `nextTask`: <script displayed here and could be really looooong
spanning multiple lines>
// Preferred
[PREFIX] nps is executing `task`
[PREFIX] nps is executing `nextTask` |
We could definitely make that be part of the options in your config (which I think only supports silent right now). That could be a separate PR if you're up for it! |
@kentcdodds What do you think about this format: options: {
'help-style': 'basic' // 'all', 'scripts'
}
And then
|
Sounds fine to me! Let's just make sure it's tested and documented too! 👍 |
@kentcdodds I've mostly figured out how to do this, but I want some feedback on my direction in case I'm missing something in the library. Is there a way to globally access the current options object? Or do I need to re-write functions all the way up the call stack to carry the options object down to the right functions? [edit] const scriptLines = filteredScripts.map(scriptObjectToChalk.bind(null, options)) Any guidance would be much appreciated. |
@iamkether, what you have there seems fine to me 👍 |
This was fixed in #164. You can now specify a |
nps
version: 5.0.3node
version: 7.4.0npm
version: 4.0.5Problem description:
Some scripts can be very long making the help output harder to read.
Suggested solution:
Either remove displaying the script completely, or supply a way to configure help so you can hide the script output, this could be done via a flag, or perhaps per script in the config file, much like
hiddenFromHelp
works, could even use that and change it from a boolean to other option like:hiddenFromHelp: 'script'
The text was updated successfully, but these errors were encountered: