(feature request): add shortcut for --prefix
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.1k
- Forks
- 4.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
The problem
Currently, the --prefix option is used to specify a directory that you want to execute npm command for. Typing --prefix each time is a lot of work.
Solution
I propose a flag -p for the npm as a shortcut to quickly specify the --prefix option when running various commands.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the npm CLI handling for the existing --prefix option and the tests covering command-line option aliases. Check how the option is parsed across the npm commands mentioned in the issue. Done means -p accepts the same directory value and produces the same behavior as --prefix, with matching test coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100