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

Separate entry points for shared package #1279

Merged
merged 7 commits into from May 15, 2023
Merged

Separate entry points for shared package #1279

merged 7 commits into from May 15, 2023

Conversation

jdorn
Copy link
Member

@jdorn jdorn commented May 12, 2023

Features and Changes

Instead of everything in the shared package living under a single namespace, there are now multiple entry points.

For example:

// Old style
import { getValidDate, DEFAULT_STATS_ENGINE } from "shared";

// New style
import { getValidDate } from "shared/dates";
import { DEFAULT_STATS_ENGINE } from "shared/constants";

This will help us avoid conflicts and better organize our code.

Currently, there are 4 Entry Points:

  • constants
  • util
  • settings
  • dates

Also, added packages/shared/README.md with instructions on how to create a new Entry Point if needed.

@github-actions
Copy link

github-actions bot commented May 12, 2023

Your preview environment pr-1279-bttf has been deployed.

Preview environment endpoints are available at:

packages/shared/src/index.ts Outdated Show resolved Hide resolved
@jdorn jdorn merged commit 76fdd6e into main May 15, 2023
3 checks passed
@jdorn jdorn deleted the shared-entry-points branch May 15, 2023 11:39
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.

None yet

2 participants