From be8a5bcaa8c6a894f106c83f0a1f930b91d08b22 Mon Sep 17 00:00:00 2001 From: "alexei.dolgolyov" Date: Sat, 11 Apr 2026 03:38:13 +0300 Subject: [PATCH] chore: add deno.json for editor IntelliSense and update README --- README.md | 17 ++++++++++++++++- pages/deno.json | 18 ++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 pages/deno.json diff --git a/README.md b/README.md index f2f9eae..d214af1 100644 --- a/README.md +++ b/README.md @@ -23,4 +23,19 @@ Functions prefixed with `API_` are auto-routed: ## Environment Variables -- `GREETING_PREFIX` — custom greeting prefix (default: "Hello") \ No newline at end of file +- `GREETING_PREFIX` — custom greeting prefix (default: "Hello") + +## Editor Setup + +The `pages/` folder contains a `deno.json` so Deno-aware editors pick up the +correct globals (`Deno.env`, `Deno.serve`, etc.). + +**VS Code:** install the +[Deno extension](https://marketplace.visualstudio.com/items?itemName=denoland.vscode-deno) +and enable it for the `pages/` folder (it should pick up `deno.json` +automatically). + +**JetBrains IDEs:** the built-in Deno plugin works the same way. + +Without a Deno-aware editor, `Deno.env` will show as an undefined identifier +— but the code still runs correctly inside the generated container. \ No newline at end of file diff --git a/pages/deno.json b/pages/deno.json new file mode 100644 index 0000000..78fd2dc --- /dev/null +++ b/pages/deno.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "lib": ["deno.ns", "deno.window", "dom", "esnext"], + "strict": true + }, + "lint": { + "rules": { + "tags": ["recommended"] + } + }, + "fmt": { + "useTabs": false, + "lineWidth": 100, + "indentWidth": 2, + "semiColons": true, + "singleQuote": false + } +} \ No newline at end of file