-
Notifications
You must be signed in to change notification settings - Fork 23
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
npm run
list commands
#54
Comments
Aside from whatever shell commands one might use to peruse a directory of scripts, no. scripty isn't under active development, but I'd definitely be open to a PR accomplishing something along these lines! |
Two utilities I use that have something akin to what I think you're asking... git-hooksicefox's git-hooks is a git subcommand for managing git hooks at a system, global, user, and repo levels. If you run the rbenv, nodenvRbenv (and nodenv) both have a So I think we have two options for how to approach this.
So I would vote for a combined option 3: Determine a predefined flag (e.g. This avoids the danger of invoking non-conforming scripts in an unexpected way. It avoids the complexity of parsing comments out of a myriad scripting languages. With the downsides that it requires explicit opt-in support from the scripts, and wouldn't work for actual binaries (as they couldn't be parsed for the opt-in magic comment). I would probably welcome such a PR with this approach. However, I'm hesitant as to the actual utility of this mechanism. Personally, I would expect that the one-line summary of most scripts would be a near re-iteration of the script name. (Anytime I wish for this feature in my own scripts, is because the script itself isn't named as well as it could be.) And secondly I would be skeptical that there would be much adoption of this feature, especially as it would require parsing and handling an argument (whereas many scripts likely just iterate over their args or pass them blindly through to subcommands instead of actually parsing out options). For both of these reasons, it feels like the cost outweighs the benefit. But I'm happy to be swayed if others feel strongly! |
Part of the beauty of npm scripts is that you can run
npm run
and see a list of all the scripts and the commands they run. No digging to find what a command does.Is there a way to get a similar list of commands like
npm run
?The text was updated successfully, but these errors were encountered: