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
refactor(init): share common files between templates #5315
Conversation
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
✔️ [V2] 🔨 Explore the source changes: 524357c 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/611289da9655350007574b60 😎 Browse the preview: https://deploy-preview-5315--docusaurus-2.netlify.app |
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-5315--docusaurus-2.netlify.app/ |
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"paths": { | ||
"@site/*": ["./*"] | ||
} | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, looks like another thing we could add to the base config 🤪
Opened a PR here: tsconfig/bases#71
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, let's hold on till that's merged
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
Thanks 👍 Going to merge this. I think we'll want in the future t only have a TS classic template folder, and maybe generate the JS template automatically with TSC targeting esnext? (like we do for the theme js/ts swizzling). That feels a bit odd to have to maintain the js/ts homepage separately. Not a priority though. |
Errr—Shouldn't we wait for the new TS base config? |
@Josh-Cena no worry we'll make another PR if needed. We'll need to update our website's ts config too anyway |
I thought about that as well. Don't know exactly how Sam did it back then, but definitely worth looking into One thing to consider: the JS template right now is not simply TS with all the types stripped. For example, they have different approaches to how feature images are imported (partly because I don't know how to type the |
We transpile the theme with 2 different babel configs (check
Oh yeah didn't notice. That type should be |
Motivation
classic-typescript
template doesn't work.FS structure:
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Related PRs
Followup of #5233.
Considerations
This may lead to more confusions for potential contributors. Should we symlink all the files still, so that contributors can edit the files in the most straightforward location?