summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--services/blog/deno.jsonc10
-rwxr-xr-xservices/blog/nuldoc14
2 files changed, 12 insertions, 12 deletions
diff --git a/services/blog/deno.jsonc b/services/blog/deno.jsonc
index d42fd765..5ae2eef5 100644
--- a/services/blog/deno.jsonc
+++ b/services/blog/deno.jsonc
@@ -18,6 +18,16 @@
"jsxImportSource": "myjsx",
"jsxImportSourceTypes": "myjsx-types",
},
+ "permissions": {
+ "default": {
+ "read": ["."],
+ "write": ["."],
+ "net": ["127.0.0.1:8000"],
+ "env": [
+ "VSCODE_TEXTMATE_DEBUG", // VSCODE_TEXTMATE_DEBUG is read by shiki.
+ ],
+ },
+ }
"tasks": {
"check": "deno check nuldoc-src/main.ts && deno lint -- nuldoc-src/ && deno fmt --check -- nuldoc-src/",
"fmt": "deno fmt -- nuldoc-src",
diff --git a/services/blog/nuldoc b/services/blog/nuldoc
index a542a30f..758ebc3f 100755
--- a/services/blog/nuldoc
+++ b/services/blog/nuldoc
@@ -1,12 +1,2 @@
-#!/bin/bash
-
-base_dir="$(dirname "$BASH_SOURCE")"
-
-# VSCODE_TEXTMATE_DEBUG is read by shiki, the syntax highlighter library
-deno run \
- --allow-read="$base_dir" \
- --allow-write="$base_dir" \
- --allow-net="127.0.0.1:8000" \
- --allow-env=VSCODE_TEXTMATE_DEBUG \
- "$base_dir/nuldoc-src/main.ts" \
- "$@"
+#!/usr/bin/env bash
+deno run -P nuldoc-src/main.ts "$@"