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

[DOCS] The --prefix flag is not documented #8197

Open
2 tasks done
lolmaus opened this issue Mar 31, 2025 · 2 comments
Open
2 tasks done

[DOCS] The --prefix flag is not documented #8197

lolmaus opened this issue Mar 31, 2025 · 2 comments
Labels
Documentation documentation related issue Needs Triage needs review for next steps

Comments

@lolmaus
Copy link

lolmaus commented Mar 31, 2025

Is there an existing issue for this?

  • I have searched the existing issues

This is a CLI Docs Enhancement, not another kind of Docs Enhancement.

  • This is a CLI Docs Enhancement.

Description of Problem

I was told to replace this in package.json:

"test:e2e": "cd ./e2e/ & npm run test"

with this:

"test:e2e": "npm --prefix e2e run test"

I failed to find any docs for the --prefix flag. There is only info on the npm prefix command that prints a global prefix, but it's quite vague on what this prefix is and what it's used for.

I've asked Grok 3 in DeepSearch mode, and it claims that the two commands above are not equivalent. But its explanation of the --prefix flag is quite confusing (likely because it has to guess rather than provide factual info based on docs, since --prefix is not documented).

Potential Solution

No response

Docs URL

I don't know if this flag applies to a specific command, all commands or a subset of commands.

@lolmaus lolmaus added Documentation documentation related issue Needs Triage needs review for next steps labels Mar 31, 2025
@ljharb
Copy link
Contributor

ljharb commented Mar 31, 2025

It shouldn't be used; the cd example is far better imo.

@lolmaus
Copy link
Author

lolmaus commented Mar 31, 2025

It shouldn't be used; the cd example is far better imo.

In this case, it should be documented as deprecated or something. 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation documentation related issue Needs Triage needs review for next steps
Projects
None yet
Development

No branches or pull requests

2 participants