-
Notifications
You must be signed in to change notification settings - Fork 6
Move readme #132
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
Move readme #132
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| packages/arkenv/README.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,90 @@ | ||
| # `arkenv` | ||
| <p align="center"> | ||
| <a href="https://arkenv.js.org"> | ||
| <img alt="arkenv - Typesafe Environment Variables" src="https://og.tailgraph.com/og?titleFontFamily=JetBrains+Mono&textFontFamily=Inter&title=ArkEnv&titleTailwind=text-[%23e9eef9]%20font-bold%20relative%20decoration-%5Brgb(180,215,255)%5D%20decoration-wavy%20decoration-[5px]%20underline%20underline-offset-[16px]%20text-5xl%20mb-8&text=Typesafe%20environment%20variables%20powered%20by%20ArkType&textTailwind=text-[%238b9dc1]%20text-3xl&bgTailwind=bg-gradient-to-b%20from-[%23061a3a]%20to-black" width="645px"> | ||
| </a> | ||
| <br /> | ||
| <a href="https://github.com/yamcodes/arkenv/actions/workflows/tests.yml?query=branch%3Amain"><img alt="Tests Status" src="https://github.com/yamcodes/arkenv/actions/workflows/tests.yml/badge.svg?event=push&branch=main"></a> | ||
| <a href="https://bundlephobia.com/package/arkenv"><img alt="Bundle Size" src="https://img.shields.io/bundlephobia/min/arkenv?label=bundle%20size&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMzcgMTU3IiB3aWR0aD0iMTM3IiBoZWlnaHQ9IjE1NyI+PHJlY3QgZmlsbD0iI2ZmZiIgeD0iNjIuMzEiIHk9IjEwMi4zMSIgd2lkdGg9IjE2Ljc0IiBoZWlnaHQ9IjE1Ljk0IiByeD0iNy45NyIvPjxyZWN0IGZpbGw9IiNmZmYiIHg9IjYyLjMxIiB5PSI4Ni4zNyIgd2lkdGg9IjE2Ljc0IiBoZWlnaHQ9IjMxLjg4IiByeD0iOC4zNyIvPjxlbGxpcHNlIGZpbGw9IiNmZmYiIGN4PSI0NC4zNCIgY3k9IjU0LjIyIiByeD0iNy4xMyIgcnk9IjguNDUiLz48ZWxsaXBzZSBmaWxsPSIjZmZmIiBjeD0iOTMuNzUiIGN5PSI1NC4yMiIgcng9IjcuMTMiIHJ5PSI4LjQ1Ii8+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTExNC4xIDExNy44NGMxLjItMS4wMiAxLjc0LTEuOTYgMi40OC0zLjU2bDE5LjMtNDIuOTJjLTIuMDItMjcuMS0zLjQ0LTQwLjctMy40NC00MC43NyAwLTIuNy0yLjE0LTQuOC00Ljc4LTQuOC0yLjYgMC00LjczIDIuMS00Ljc4IDQuNzBsLTMuMDUgMzcuNy0xNC43NiA0Mi4xYy0uNDQuOC0uNyAxLjgtLjcgMi44IDAgLjgzLjIgMS42NC41IDIuNGwxMC40MyA0MC4xMiAxMS41NS0zLjEtMTIuNzQtMzQuOHoiLz48cGF0aCBmaWxsPSIjZmZmIiBkPSJNMjMuMjcgMTE3Ljg0Yy0xLjItMS4wMi0xLjczLTEuOTYtMi40Ny0zLjU2TDEuNSA3MS4zNmMyLjAyLTI3LjEgMy40My00MC43IDMuNDMtNDAuNzcgMC0yLjcgMi4xNC00LjggNC44LTQuOCAyLjYgMCA0LjcyIDIuMSA0Ljc3IDQuN2wzLjA1IDM3LjcgMTQuNzUgNDIuMmMuNDUuOC43IDEuOC43IDIuOCAwIC44LS4xOCAxLjYtLjUgMi40bC0xMC40IDQwLjEtMTEuNTUtMy4xIDEyLjc0LTM0Ljh6Ii8+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTk0LjI2IDkxLjIzYzEyLjItNy41NCAyMC4yNS0yMC4zOCAyMC4yNS0zNC45NCAwLTMuOS0uNS03LjYtMS41LTExLjFDMTEyLjggMjEgOTMuMiAxLjUgNjguOTggMS41UzI1IDIxLjAyIDI0Ljg3IDQ1LjJjLTEuMDUgMy41Mi0xLjYgNy4yMy0xLjYgMTEuMDUgMCAxNi41NCAxMC40MyAzMC45IDI1LjYgMzcuNzItLjEgMS40LS4xIDIuODItLjEgNC4yNiAwIDIzLjIyIDEwLjIyIDQyLjA0IDIyLjkgNDIuMDQgMTIuNjUgMCAyMi45Mi0xOC44IDIyLjkyLTQyLjAzIDAtMi40LS4yLTQuOC0uNC03LjF6Ii8+PC9zdmc+"></a> | ||
| <a href="https://www.npmjs.com/package/arkenv?activeTab=versions"><img alt="Total Downloads" src="https://badgen.net/npm/dt/arkenv?icon=npm&color=blue&label=downloads"></a> | ||
| <a href="https://www.npmjs.com/package/arkenv?activeTab=dependencies"><img alt="Dependency Count" src="https://badgen.net/bundlephobia/dependency-count/arkenv?icon=npm&color=blue&label=dependencies"></a> | ||
| <a href="https://arktype.io/"><img alt="Powered By ArkType" src="https://badgen.net/static/powered by/ArkType"></a> | ||
| </p> | ||
|
|
||
| Hello, developers! Welcome to the `arkenv` package codebase. This directory contains the core implementation of ArkEnv, providing typesafe environment variable parsing and validation for Node.js. | ||
| ## Installation | ||
|
|
||
|
yamcodes marked this conversation as resolved.
|
||
| For more information, please refer to the [README](../../README.md) in the monorepo root. | ||
| <details open> | ||
| <summary>npm</summary> | ||
|
|
||
| Happy coding! | ||
| ```sh | ||
| npm install arkenv arktype | ||
| ``` | ||
| </details> | ||
|
|
||
| <details> | ||
| <summary>pnpm</summary> | ||
|
|
||
| ```sh | ||
| pnpm add arkenv arktype | ||
| ``` | ||
| </details> | ||
|
|
||
| <details> | ||
| <summary>Yarn</summary> | ||
|
|
||
| ```sh | ||
| yarn add arkenv arktype | ||
| ``` | ||
| </details> | ||
|
|
||
| <details> | ||
| <summary>Bun</summary> | ||
|
|
||
| ```sh | ||
| bun add arkenv arktype | ||
| ``` | ||
| </details> | ||
|
|
||
| ## Quickstart | ||
|
|
||
| > [!TIP] | ||
| > Find more examples in the [examples](https://github.com/yamcodes/arkenv/tree/main/examples) directory. | ||
|
|
||
| ```ts | ||
| import { createEnv } from 'arkenv'; | ||
|
|
||
| const env = createEnv({ | ||
| HOST: "string.host", // valid IP address or localhost | ||
| PORT: "number.port", // valid port number (0-65535) | ||
| NODE_ENV: "'development' | 'production' | 'test'", | ||
| }); | ||
|
|
||
| // Automatically validate and parse process.env | ||
| // TypeScript knows the ✨exact✨ types! | ||
| console.log(env.HOST); // (property) HOST: string | ||
| console.log(env.PORT); // (property) PORT: number | ||
| console.log(env.NODE_ENV); // (property) NODE_ENV: "development" | "production" | "test" | ||
| ``` | ||
|
|
||
| ## Features | ||
|
|
||
| - 🔒 **Typesafe**: Full TypeScript support with inferred types | ||
| - 🚀 **Runtime validation**: Catch missing or invalid environment variables early | ||
| - 💪 **Powered by ArkType**: Leverage ArkType's powerful type system | ||
| - 🪶 **Lightweight**: Only a single dependency ([5.6 kB](https://bundlephobia.com/package/chalk@5.4.1)) | ||
| - ⚡ **Fast**: Optimized for performance with minimal overhead | ||
|
|
||
| ## Documentation | ||
|
|
||
| For detailed documentation and examples, please visit our [documentation site](https://arkenv.js.org/docs). | ||
|
|
||
| ## Plugins | ||
|
|
||
| - [@arkenv/vite-plugin](https://github.com/yamcodes/arkenv/tree/main/packages/vite-plugin): [Vite](https://vite.dev/) plugin to validate environment variables at build time | ||
|
|
||
| ## Contributing | ||
|
|
||
| Contributions are welcome! Please see [CONTRIBUTING.md](https://github.com/yamcodes/arkenv/blob/main/CONTRIBUTING.md) for more information. | ||
|
|
||
| ## Thanks / Inspiration | ||
|
|
||
| Find projects and people who helped or inspired the creation of ArkEnv in [THANKS.md](https://github.com/yamcodes/arkenv/blob/main/THANKS.md). Thank you 🙏 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.