-
Notifications
You must be signed in to change notification settings - Fork 13
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
Feature request: add support for command with ':' #24
Comments
interesting idea, I don't use the ":" in my script names, but definitely see the value in your case. Have you looked at the code for finding scripts in json-package? If you can implement it (with tests) in json-package, I promise to quickly merge it and bump |
thanks for a quick response! I've looked through the method, actually I'll try to find time to implement it with tests. |
Maybe someday I'll find time to work on it 🙃 |
Actually, I think what would be best is if the scripts were sorted via match-sorter. Would you be willing to accept a PR that does that? |
Of course @kentcdodds - everything will be merged quickly :) |
Well, I am on board, but no one has opened a pull request, so ... |
If your scripts have separate words, you can specify prefixes for each one. For example, the `package.json` file below has 3 scripts ```json { "scripts": { "cypress:open": "cypress open", "cypress:run": "cypress run", "cypress:run:record": "cypress run --record" } } ``` You can quickly open Cypress using ``` nr c:o # same as nr c-o # same as nr cy-open ``` Characters `:` and `-` are interchangeable and can be used in the prefix or in the script names. In the above situation ``` nr c-r # returns both "cypress:run" and "cypress:run:record" nr c-r-r # executes "cypress:run:record" ```
🎉 This issue has been resolved in version 1.17.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Hi, @bahmutov, thanks for you amazing work!
I frequently use scripts like
"watch:test": "npm run test -- --watch"
, that contain:
in the name.So the idea to support
nr w:t
What do you think? I guess it can be done as an extension of json-package, isn't it?
The text was updated successfully, but these errors were encountered: