Use deno.json and deno.lock instead of import_map.json

This commit is contained in:
Karolis2011 2025-11-29 23:30:56 +02:00
parent 8ae1d52f8c
commit c064e2ded8
2 changed files with 6 additions and 11 deletions

View file

@ -1,7 +0,0 @@
{
"imports": {
"@std/cli": "jsr:@std/cli@^1.0.0",
"@std/fs": "jsr:@std/fs@^1.0.0",
"@std/path": "jsr:@std/path@^1.0.0"
}
}

View file

@ -365,14 +365,16 @@ scripts() {
return 127;
fi
local import_map_url
local config_url lock_url
if [[ "$ref" == v* ]]; then
import_map_url="${BASE_RAW}/tag/$ref/import_map.json"
config_url="${BASE_RAW}/tag/$ref/deno.json"
lock_url="${BASE_RAW}/tag/$ref/deno.lock"
else
import_map_url="${BASE_RAW}/branch/$ref/import_map.json"
config_url="${BASE_RAW}/branch/$ref/deno.json"
lock_url="${BASE_RAW}/branch/$ref/deno.lock"
fi
deno run --allow-all --import-map="$import_map_url" "$url" "$@";
deno run --allow-all --config="$config_url" --lock="$lock_url" "$url" "$@";
}
# --- Autocompletion ---------------------------------------------------