cypke
cypke9mo ago

`deno add -D`

What is the -D flag doing in deno? I mean according to the manual: -D, --dev Add as a dev dependency But is anything imported differently in deno.json? To me it looks like it's the same
5 Replies
crowlKats
crowlKats9mo ago
this is only applicable for package.json
cypke
cypkeOP9mo ago
So how does deno decide which packages to include when building? It only includes the imported libraries? In other words, if I install a library and don't import it, will it be like "devDependencies" in package.json?
crowlKats
crowlKats9mo ago
what do you mean with "building"?
cypke
cypkeOP9mo ago
I guess when compiling, or publishing npm does not include devDependencies when you publish or compile the code
crowlKats
crowlKats9mo ago
when deno runs, it only uses the dependencies it needs. same applies for jsr

Did you find this page helpful?