Skip to content

feat: npm init docusaurus, yarn create docusaurus - #5635

Merged
slorber merged 15 commits into
mainfrom
slorber/create-docusaurus
Oct 7, 2021
Merged

slorber merged 15 commits into
mainfrom
slorber/create-docusaurus

Conversation

@slorber

@slorber slorber commented Oct 1, 2021 •

Copy link
Copy Markdown
Collaborator

Motivation

Our init command is complex to type / remember:

npx @docusaurus/init@latest init [name] [template]

Using the package name create-docusaurus and {isDefault: true} allows to simplify it greatly:

npm init docusaurus
yarn create docusaurus

npx create-docusaurus also works

As this package is outside of @docusaurus org, I assigned proper roles on npm to the existing team.

Unfortunately, we need to keep @latest due to npm: npm/cli#3821

Have you read the Contributing Guidelines on pull requests?

yes

Test Plan

init tests + e2e CI tests

@slorber slorber added the pr: new feature This PR adds a new API or behavior. label Oct 1, 2021
@slorber
slorber requested a review from lex111 as a code owner October 1, 2021 16:27
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Oct 1, 2021
@netlify

netlify Bot commented Oct 1, 2021

Copy link
Copy Markdown

✔️ [V2]

🔨 Explore the source changes: 1c68910

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/615736ef5cf7750008d17785

😎 Browse the preview: https://deploy-preview-5635--docusaurus-2.netlify.app

@github-actions

github-actions Bot commented Oct 1, 2021 •

Copy link
Copy Markdown

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 74
🟢 Accessibility 98
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-5635--docusaurus-2.netlify.app/

@github-actions

github-actions Bot commented Oct 1, 2021 •

Copy link
Copy Markdown

Size Change: +707 B (0%)

Total Size: 834 kB

Filename Size Change
website/build/assets/css/styles.********.css 93.9 kB +53 B (0%)
website/build/assets/js/main.********.js 420 kB +288 B (0%)
website/build/docs/index.html 44.6 kB +53 B (0%)
website/build/docs/installation/index.html 53.1 kB +313 B (+1%)
ℹ️ View Unchanged
Filename Size
website/.docusaurus/globalData.json 38.3 kB
website/build/blog/2017/12/14/introducing-docusaurus/index.html 67 kB
website/build/blog/index.html 38.1 kB
website/build/index.html 30.8 kB
website/build/tests/docs/index.html 25.5 kB
website/build/tests/docs/standalone/index.html 22.9 kB

compressed-size-action

@netlify

netlify Bot commented Oct 1, 2021 •

Copy link
Copy Markdown

✔️ [V2]

🔨 Explore the source changes: 8186a50

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/615efd2c1bfe5200070b12a5

😎 Browse the preview: https://deploy-preview-5635--docusaurus-2.netlify.app

@lex111 lex111 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Really great idea!

Comment thread packages/create-docusaurus/package.json Outdated
"name": "@docusaurus/init",
"version": "2.0.0-beta.6",
"name": "create-docusaurus",
"version": "0.0.6",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Curious, why "0.0.6"?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thanks

Just because I did some test publish attempt to make sure it works and wanted to keep the ability to increment if needed

This will be fixed on next release by lerna so it doesn't matter

@slorber

slorber commented Oct 7, 2021

Copy link
Copy Markdown
Collaborator Author

Reverting npm2yarn temporarily because there's a bug and the Yarn tab shows yarn init => bad: bgub/npm-to-yarn#21

@slorber
slorber merged commit f6ec757 into main Oct 7, 2021
@slorber
slorber deleted the slorber/create-docusaurus branch October 7, 2021 14:06
@Josh-Cena Josh-Cena mentioned this pull request Nov 3, 2021
7 tasks done
@waldyrious waldyrious mentioned this pull request Dec 4, 2024
1 of 3 tasks
mrizwanashiq pushed a commit to mrizwanashiq/docusaurus that referenced this pull request Jun 25, 2026
* initial create-docusaurus impl

* cleanup

* @docusaurus/init renamed to create-docusaurus

* 0.0.6

* update lockfile

* fix lint

* remove npm2yarn for "npm init" because npm2yarn doesn't convert it and yarn result fails to execute

* prettier

* add correct version

* prettier

* prettier

* prettier

* prettier

* fix annoying --config .prettierrc issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Signed Facebook CLA pr: new feature This PR adds a new API or behavior.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants