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(core): add --config param to swizzle command #8210

Merged
merged 1 commit into from Oct 20, 2022

Conversation

e-im
Copy link
Contributor

@e-im e-im commented Oct 13, 2022

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

My Docusaurus site uses a non-default config location and I am unable to use swizzle.

Test Plan

Because swizzle is not currently working out of the box on main, I've applied this additional diff for the sake of the test.

  1. Move website/docusaurus.config.js to website/cfg.js.
  2. Run yarn swizzle --config cfg.js.
  3. See that swizzle works as intended.

Test links

N/A

Related issues/PRs

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Oct 13, 2022
@e-im e-im changed the title fix: add --config param to swizzle command feat: add --config param to swizzle command Oct 13, 2022
@netlify
Copy link

netlify bot commented Oct 13, 2022

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit aecdfd3
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/63489a9605cbad00083f9bba
😎 Deploy Preview https://deploy-preview-8210--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🟠 89 🟢 98 🟢 100 🟢 100 🟢 90 Report
/docs/installation 🟠 86 🟢 100 🟢 100 🟢 100 🟢 90 Report

Copy link
Collaborator

@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

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

Maybe add a test with a different config? (I forgot if we have similar tests)

@e-im
Copy link
Contributor Author

e-im commented Oct 18, 2022

I did not see that this was tested anywhere else, but I'll add tests in a few days.

@slorber slorber added pr: new feature This PR adds a new API or behavior. to backport This PR is planned to be backported to a stable version of Docusaurus labels Oct 20, 2022
@slorber
Copy link
Collaborator

slorber commented Oct 20, 2022

yes we don't have test on other CLIs for now so that matches with our current practices 😅

LGTM thanks 👍

@slorber slorber changed the title feat: add --config param to swizzle command feat(core): add --config param to swizzle command Oct 20, 2022
@slorber slorber merged commit 7b3ebb7 into facebook:main Oct 20, 2022
@e-im e-im deleted the swizzle-config-path branch October 20, 2022 14:45
@slorber slorber added backported This PR has been backported to a stable version of Docusaurus and removed to backport This PR is planned to be backported to a stable version of Docusaurus labels Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported This PR has been backported to a stable version of Docusaurus 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

4 participants