-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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: use "npx create-docusaurus" for init #5797
Conversation
✔️ [V2] 🔨 Explore the source changes: 9dc9879 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/617941d2d9b8c60008639354 😎 Browse the preview: https://deploy-preview-5797--docusaurus-2.netlify.app |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-5797--docusaurus-2.netlify.app/ |
Size Change: -342 B (0%) Total Size: 847 kB
ℹ️ View Unchanged
|
This is marginally better than Should we at least inform the users of the possibility of |
It's the same, but also avoid renaming back After Node 14 end of life things might become simpler and it's worth to keep that package name.
I'd like to, but there's an issue in npm2yarn: nebrelbug/npm-to-yarn#21 Also not sure tabs are the most convenient, considering we mention init command in some inline code blocks, it requires some doc rewrite to add tabs everywhere. Also npm does not use latest but cached version so For now I think npx is fine, we'll revisit this later. |
Yeah, I'm aware of that issue, just not sure if we should not document it anywhere. I guess those who know the magic of |
nobody complained with the old command so I'd rather keep the doc simple and restore it, until we have a proper way to reference the new commands in a simple way, without providing any warnings and additional walls of text |
Makes sense. Normal users only use it a few times in their entire lives, so not a huge issue. |
Motivation
Fixes #5735 (comment)
npm init
is currently annoying due to a change in how args are provided:npm init docusaurus@latest my-website classic --typescript
npm init docusaurus@latest my-website classic -- --typescript
The following works with both npm versions:
npx create-docusaurus@latest my-website classic --typescript
works reliably with npm 6 + more recent versionsHave you read the Contributing Guidelines on pull requests?
yes
Test Plan
local with npm 6+7