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

[chore] refactor exports #10

Merged
merged 2 commits into from
Nov 7, 2023
Merged

[chore] refactor exports #10

merged 2 commits into from
Nov 7, 2023

Conversation

jackyzha0
Copy link
Member

Why

  • Webpack doesn't treeshake classes very well. We also cluttered up the top-level namespace quite a bit by shoving everything in index.ts

What

  • Split up the exports into semantically useful submodules
  • Bumps @replit/river to 0.3.0

Copy link
Contributor

@bradymadden97 bradymadden97 left a comment

Choose a reason for hiding this comment

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

Accepting to unblock, but I'd strongly recommend starting to add some doc comments to these exports, especially while you're already in here cleaning stuff up.

Normally when I start exploring a new library I start with the exports to learn how the pieces fit together. Since this library has a pretty large number of exports (more than I would expect tbh), I think it's even more important to have doc comments. I find doccomments to be much more useful than a separate document, as that usually quickly goes stale.

@jackyzha0
Copy link
Member Author

Yup, I need to do another big refactor here that changes the types pretty significantly (WS-1403 and WS-684) so I was holding off on JSDoc but I can do that after this PR

@jackyzha0 jackyzha0 merged commit 8a5b70c into main Nov 7, 2023
4 checks passed
@jackyzha0 jackyzha0 deleted the jackyzha0/export-refactor branch November 7, 2023 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants