Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: correct the command to show help in README.md#658

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
cexbrayat merged 1 commit intovuejs:mainfromshi0rik0:main
Jan 12, 2025

Conversation

shi0rik0
Copy link
Contributor

The old command will show the help ofnpm create, not the help ofcreate-vue.

Description

Current documentation says we can usenpm create vue@latest -- --help to show the help ofcreate-vue, but I found it will print the help ofnpm create. I'm not sure if it's a bug ofnpm, butnpx create-vue@latest -- --help works fine.

My Enviroment

Windows 11 + npm 10.9.0

Copy link
Member

@cexbrayatcexbrayat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks for the PR

Thenpm create vue@latest -- --help command is correct on macOS and displays the help:

npm create vue@latest -- --helpNeed to install the following packages:create-vue@3.13.0Ok to proceed? (y)> npx> create-vue --helpUsage: create-vue [FEATURE_FLAGS...] [OPTIONS...] [DIRECTORY]Create a new Vue.js project.Start the CLI in interactive mode when no FEATURE_FLAGS is provided, or if the DIRECTORY argument is not a valid package name.Options:  --force    Create the project even if the directory is not empty.  --bare    Create a barebone project without example code.  --help    Display this help message.  --version    Display the version number of this CLI.

Thenpx version that works for you on Windows sadly doesn't work properly on macOS and executes create-vue as if a project was created:

npx create-vue@latest -- --helpVue.js - The Progressive JavaScript Framework✖ Add TypeScript ? … No / Yes

@shi0rik0
Copy link
ContributorAuthor

shi0rik0 commentedJan 9, 2025
edited
Loading

@cexbrayat I tried again and found that:

  1. Incmd, thenpm version works but thenpx does not, jsut like on your MacOS.
  2. In PowerShell, thenpx version works but thenpm does not.

This is interesting. I'll investigate it later.

Anyway, I believe that it's a problem related tonpm.

@shi0rik0
Copy link
ContributorAuthor

@cexbrayat OK, I think I found out the answer. It's the PowerShell who is causing this problem behind the scene. According to my test andthis question, the syntax of PowerShell will treat-- specially, so executingnpm create vue@latest -- --help will be treated asnpm create vue@latest --help. A solution is to usenpm create vue@latest '--' --help.

Do you think we should add a notice about this for Windows users?

@cexbrayat
Copy link
Member

Yes, maybe you can add a mention for Powershell users 👍

@shi0rik0
Copy link
ContributorAuthor

@cexbrayat I've updated. Could you please review again?

Copy link
Member

@cexbrayatcexbrayat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thank you 👍

@cexbrayatcexbrayat merged commit44ce566 intovuejs:mainJan 12, 2025
52 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@cexbrayatcexbrayatcexbrayat approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@shi0rik0@cexbrayat

[8]ページ先頭

©2009-2025 Movatter.jp