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(admin): update repo testing instructions to reflect v2 #5845

Merged
merged 6 commits into from Nov 27, 2021

Conversation

wpyoga
Copy link
Contributor

@wpyoga wpyoga commented Oct 31, 2021

Motivation

I had to discover this method of installing docusaurus packages from the local repo for testing by myself -- hopefully this will help others (and maybe future me) when trying to test their local changes.

I also made some trivial changes to CONTRIBUTING.md

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

I tested the commands I added to the documentation, and they work fine:

  • yarn build works
  • any changes made in the local docusaurus repo are applied to the test project

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Oct 31, 2021
@wpyoga wpyoga changed the title Doc changes docs: add easier method to test local repo, using yarn Oct 31, 2021
@netlify
Copy link

netlify bot commented Oct 31, 2021

✔️ [V2]
Built without sensitive environment variables

🔨 Explore the source changes: b72f3cf

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

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

@github-actions
Copy link

github-actions bot commented Oct 31, 2021

⚡️ Lighthouse report for the changes in this PR:

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

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

@lex111
Copy link
Contributor

lex111 commented Oct 31, 2021

Actually, for local testing we have already dedicated command yarn test:build:website.

@wpyoga wpyoga changed the title docs: add easier method to test local repo, using yarn docs: add easier method to test local repo in existing project, using yarn Nov 1, 2021
@wpyoga
Copy link
Contributor Author

wpyoga commented Nov 1, 2021

Thanks, I've updated the title to better describe the purpose.

@slorber
Copy link
Collaborator

slorber commented Nov 3, 2021

Hey, I don't think what you suggest is the easiest way.

You should rather use the yarn link command and link all your projet's packages to your docusaurus local forked packages: this is a quite common workflow

@Josh-Cena
Copy link
Collaborator

I tested with yarn add and yarn link. There seems to be a series of problems around a naive symlink, so I eventually decided that yarn add is actually the most convenient way unless you use verdaccio.

A lot of this doc is still about v1 development anyways—it hasn't been updated for a long time. I also sent #5989 to refresh the docs. I personally think this one is good to merge.

@Josh-Cena Josh-Cena added the pr: documentation This PR works on the website or other text documents in the repo. label Nov 26, 2021
@Josh-Cena Josh-Cena changed the title docs: add easier method to test local repo in existing project, using yarn docs(admin): update testing docs to reflect v2 usage Nov 26, 2021
@Josh-Cena Josh-Cena changed the title docs(admin): update testing docs to reflect v2 usage docs(admin): update repo testing instructions to reflect v2 Nov 26, 2021
@Josh-Cena Josh-Cena merged commit 30cf744 into facebook:main Nov 27, 2021
@slorber
Copy link
Collaborator

slorber commented Dec 1, 2021

Yes this doc is a bit outdated.

I tested with yarn add and yarn link. There seems to be a series of problems around a naive symlink,

Yes there are generally issues due to duplicate React versions found etc, you have to symlink it too and symlink all packages, not just one or 2. Last time I tried it was definitively possible.

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: documentation This PR works on the website or other text documents in the repo.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants