From 2b2776307bc90cde9dd9fa048c815700efce060d Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 5 Jul 2025 23:46:47 +0700 Subject: [PATCH] :pencil: writing docs for create public env helper --- scripts/create-example-env.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/create-example-env.ts b/scripts/create-example-env.ts index 463dc78..fadfe71 100644 --- a/scripts/create-example-env.ts +++ b/scripts/create-example-env.ts @@ -1,6 +1,7 @@ import fs from "fs"; import path from "path"; +// These keys will not be cleared in the .env.example file const PRESERVED_KEYS = [ "APP_NAME", "APP_ENV", @@ -11,6 +12,10 @@ const PRESERVED_KEYS = [ "REDIS_PORT", ]; +/** + * Script to create or update the .env.example file based on the .env file. + * It preserves certain keys and clears their values in the .env.example file. + */ try { const envPath = path.join(process.cwd(), ".env"); const envExamplePath = path.join(process.cwd(), ".env.example");