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: defineEnv util #372

Merged
merged 4 commits into from
Dec 11, 2024
Merged

feat: defineEnv util #372

merged 4 commits into from
Dec 11, 2024

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Dec 11, 2024

This PR adds a new defineEnv({ presets: [], ... }): { env } utility aiming to replace env(presets[]): env util for integration usage.

The benefit of this one is that it can be extendable with more features, options and shortcuts.

Example:

const { env } = defineEnv({
 nodeCompat: true,
 presets: [myPreset],
 overrides: {}
});

@pi0 pi0 self-assigned this Dec 11, 2024
@pi0 pi0 merged commit 4cd756d into main Dec 11, 2024
2 checks passed
@pi0
Copy link
Member Author

pi0 commented Dec 11, 2024

(merging as experimental to iterate and improve API features)

@pi0 pi0 deleted the feat/define-env branch December 11, 2024 18:02
src/env.ts Show resolved Hide resolved
src/types.ts Show resolved Hide resolved
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