One of the things I love about Deno is that since it implements standard web APIs, many libraries built for the browser just work. For example, I recently made a simple static site generator with Deno to make my blog, and I found that I could use Marked for markdown support simply by importing it like this:

  import 'https://cdn.jsdelivr.net/npm/[email protected]/marked.min.js';
  // now I can use window.marked()

> import 'https://cdn.jsdelivr.net/npm/[email protected]/marked.min.js';

Doesn't this mean your code won't run if the website https://cdn.jsdelivr.net goes down?

In Node.js you download modules you need, to a local folder under you dev-folder. So you can run and develop and test your code whether you have internet connection or not.

Is this really a better workflow? I mean it works, but now you do not have a central list of all your external dependencies. Sure they recommend you just do all your imports in a single file and re-export them. But that sounds very tedious and at the end of the day to what advantage? I'm really struggling to see it.

Rather than importing and re-exporting dependencies, Deno supports import maps:

https://github.com/WICG/import-maps https://deno.land/[email protected]/linking_to_external_code/im...