chore: add deno.json for editor IntelliSense and update README
This commit is contained in:
@@ -23,4 +23,19 @@ Functions prefixed with `API_` are auto-routed:
|
||||
|
||||
## Environment Variables
|
||||
|
||||
- `GREETING_PREFIX` — custom greeting prefix (default: "Hello")
|
||||
- `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.
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user