Reputation: 13247
I had installed some scripts in deno before.
How do I list all the installed scripts in deno ?
Is there any deno subcommand to do this ?
Upvotes: 3
Views: 926
Reputation: 40444
All downloaded scripts are stored in
$DENO_DIR/deps
$DENO_DIR
varies depending on the OS
$XDG_CACHE_HOME/deno
or $HOME/.cache/deno
%LOCALAPPDATA%/deno
(%LOCALAPPDATA% = FOLDERID_LocalAppData
)$HOME/Library/Caches/deno
If something fails, it falls back to $HOME/.deno
You can check the location doing:
deno info
Which will output:
DENO_DIR location: "/home/user/.cache/deno"
Remote modules cache: "/home/user/.cache/deno/deps"
TypeScript compiler cache: "/home/user/.cache/deno/gen"
The file is stored with a hashed name, so if you want to see the URL you'll need to access {file}.metadata.json
and check url
property.
You can use the following command to list all:
# Change /home/user/.cache/deno/deps with your location
find /home/user/.cache/deno/deps -name *.metadata.json | xargs jq ".url"
"https://deno.land/[email protected]/path/_util.ts"
"https://deno.land/std/path/mod.ts"
"https://deno.land/[email protected]/http/_io.ts"
"https://deno.land/[email protected]/fmt/colors.ts"
"https://deno.land/std/fmt/colors.ts"
"https://deno.land/[email protected]/http/server.ts"
"https://deno.land/std/async/mux_async_iterator.ts"
"https://deno.land/std/testing/diff.ts"
Upvotes: 2