Move scripts to scripts/ and update loader paths; use remote import_map with --no-config

This commit is contained in:
Karolis2011 2025-11-29 23:48:28 +02:00
parent 4322bdeb1f
commit 7f69b3e59c
4 changed files with 662 additions and 7 deletions

View file

@ -355,9 +355,9 @@ scripts() {
local url
if [[ "$ref" == v* ]]; then
url="${BASE_RAW}/tag/$ref/$name.ts"
url="${BASE_RAW}/tag/$ref/scripts/$name.ts"
else
url="${BASE_RAW}/branch/$ref/$name.ts"
url="${BASE_RAW}/branch/$ref/scripts/$name.ts"
fi
if ! curl -fsI "$url" >/dev/null 2>&1; then
@ -365,14 +365,14 @@ scripts() {
return 127;
fi
local config_url
local import_map_url
if [[ "$ref" == v* ]]; then
config_url="${BASE_RAW}/tag/$ref/deno.json"
import_map_url="${BASE_RAW}/tag/$ref/import_map.json"
else
config_url="${BASE_RAW}/branch/$ref/deno.json"
import_map_url="${BASE_RAW}/branch/$ref/import_map.json"
fi
deno run --allow-all --config="$config_url" "$url" "$@";
deno run --allow-all --no-config --import-map="$import_map_url" "$url" "$@";
}
# --- Autocompletion ---------------------------------------------------