drom765
Need help testing out my package on Linux/Mac
Hello there!
If you have some spare time and are using Linux or Mac, please consider checking out my jsr package to see if it works as expected.
Thank you!
https://jsr.io/@despacito/commit-canvas-cli@0.9.2
1 replies
About imports
Hi, I'm new to Deno and looking for answers regarding imports.
1.
2. The documentation at https://deno.land/std@0.224.0 suggests that I should avoid usingHowever, since version 1.5, Deno does tree-shaking, making this seem irrelevant. Is this correct?
3. Should I avoid or update imports from
4. The documentation mentions the
5. Is there a benefit to importing modules directly in the source code rather than using an import map in general?
deno add @org/package
registers the package at deno.jsonc.imports
even if import_maps.json
is present. Can this be configured, or is Deno moving away from placing import aliases in a separate file? On one hand, having a separate file seems maintainable; on the other, the import map is kind of a Deno "feature."
2. The documentation at https://deno.land/std@0.224.0 suggests that I should avoid using
*
when importing only one function (import * as fs from "https://deno.land/std@0.224.0/fs/mod.ts";
). 3. Should I avoid or update imports from
deno.land/
and use jsr
packages exclusively? The latter seems friendlier to me because I find it cumbersome to look up which file I need within a package (sometimes it's specific like .../assert.ts
, sometimes .../mod.ts
). Are there any important packages/code that aren't on jsr
but are present on deno.land
?
4. The documentation mentions the
$
convention for std (only), yet I didn't find any packages, even official ones, using it. Is my iteration on $
confusing? ("$assert": "jsr:@std/assert@^1.0.0"
)
5. Is there a benefit to importing modules directly in the source code rather than using an import map in general?
3 replies