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

feat: npm init docusaurus, yarn create docusaurus #5635

Merged
merged 15 commits into from Oct 7, 2021

Conversation

slorber
Copy link
Collaborator

@slorber slorber commented Oct 1, 2021

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
Copy link

netlify bot commented Oct 1, 2021

✔️ [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
Copy link

github-actions bot commented Oct 1, 2021

⚡️ 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
Copy link

github-actions bot commented Oct 1, 2021

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
Copy link

netlify bot commented Oct 1, 2021

✔️ [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

Copy link
Contributor

@lex111 lex111 left a comment

Choose a reason for hiding this comment

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

Really great idea!

"name": "@docusaurus/init",
"version": "2.0.0-beta.6",
"name": "create-docusaurus",
"version": "0.0.6",
Copy link
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
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
Copy link
Collaborator Author

slorber commented Oct 7, 2021

Reverting npm2yarn temporarily because there's a bug and the Yarn tab shows yarn init => bad: nebrelbug/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
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.

None yet

3 participants