Skip to content

Commit b73e31f

Browse files
committed
docs: enhance readme
1 parent bfc9453 commit b73e31f

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

README.md

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -169,24 +169,7 @@ To simplify the management of environment variables for specific platforms, you
169169

170170
### Example with Vercel Preset
171171

172-
```typescript
173-
import { z } from 'zod';
174-
import { preset } from '@ashgw/ts-env'
175-
176-
const isBrowser = typeof window !== "undefined";
177-
178-
export const env = createEnv({
179-
vars: {
180-
YOUR_ENV_VAR: z.string().min(7).startsWith("S-"),
181-
...preset('vercel'),
182-
},
183-
skipValidation: isBrowser, // Since env vars are already injected at build time
184-
});
185-
```
186-
Now you have access to all of vercel env vars such as:
187-
```typescript
188-
console.debug(env.VERCEL_GIT_COMMIT_SHA)
189-
```
172+
![image](https://github.com/user-attachments/assets/92acc69b-a5fe-4c54-9de4-90fba356bcc1)
190173
#### Supported presets
191174
- Vercel
192175
- Netlify

0 commit comments

Comments
 (0)