Skip to content

feat: TypeScript presets/plugins should expose Options typing #5456

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

Merged
merged 7 commits into from
Sep 1, 2021

Conversation

slorber
Copy link
Collaborator

@slorber slorber commented Aug 31, 2021

Motivation

  • Each TS plugin should expose an Options type
  • Each preset (only one actually) should re-expose underlying plugin options + ThemeConfig
  • Site configs can consume those exported types for IDE auto-completion with JSDoc annotations
  • Temporarily disable bootstrap theme integration / TS typechecking (we might even delete it someday?)

Have you read the Contributing Guidelines on pull requests?

yes

Test Plan

IDE autocompletion works

…emeConfig types + remove TS typechecking for the bootstrap theme
…emeConfig types + remove TS typechecking for the bootstrap theme
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Aug 31, 2021
@Josh-Cena
Copy link
Collaborator

Can we also move plugin-content-blog/index.d.ts to plugin-content-blog/src/plugin-content-blog.d.ts? The only type definition that's in a different place.

@slorber
Copy link
Collaborator Author

slorber commented Sep 1, 2021

Yes just moved it.

All these TS files are not very organized currently, we'll need to do further cleanup 🤪

@netlify
Copy link

netlify bot commented Sep 1, 2021

✔️ [V2]

🔨 Explore the source changes: 468b541

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

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

@github-actions
Copy link

github-actions bot commented Sep 1, 2021

⚡️ Lighthouse report for the changes in this PR:

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

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

@github-actions
Copy link

github-actions bot commented Sep 1, 2021

Size Change: -2 B (0%)

Total Size: 822 kB

ℹ️ View Unchanged
Filename Size Change
website/.docusaurus/globalData.json 36.5 kB 0 B
website/build/assets/css/styles.********.css 93.7 kB 0 B
website/build/assets/js/main.********.js 412 kB 0 B
website/build/blog/2017/12/14/introducing-docusaurus/index.html 66.8 kB 0 B
website/build/blog/index.html 37.6 kB 0 B
website/build/docs/index.html 44.7 kB -1 B (0%)
website/build/docs/installation/index.html 52.7 kB -1 B (0%)
website/build/index.html 30.4 kB 0 B
website/build/tests/docs/index.html 25 kB 0 B
website/build/tests/docs/standalone/index.html 22.6 kB 0 B

compressed-size-action

@slorber slorber marked this pull request as ready for review September 1, 2021 08:37
@slorber slorber requested a review from lex111 as a code owner September 1, 2021 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants