When to use deno add compared to import with a prefix?
As the title says, I can import like this:
And it will work, but there is also
deno add
, which I'm recommended to use if I import from @std/csv/parse
. When should I use deno add
?2 Replies
Rule of thumb: Use inline
jsr:
/ npm:
specifiers for simple scripts and define deps in deno.json
for more complex projects. Being able to look up all dependencies of a project in one file makes it easier to manage them and automate it via tooling like deno outdated
Ok, thank you!