Comment by mahboi

2 months ago

This doesn't seem like a big deal. Don't you just npm install whatever you need and then change the import names?

I don't want the install step. That's redundant. Just a .ts script I can run via `deno run bla.ts` and which directly pulls in any dependency it needs from the web.

  • Is it?

    It's a different mental model I'd say. Specifically: First, I add the part to the pile, then I wire it up.

    I wouldn't call it redundant to explicitly spell out what actually happens. If anything, I'd call it good to remind people that they are adding something into their scope of responsibility.

    • There are use cases like small scripts where people just want a single js file. So the top of that file basically functions as the package.json.

  • I understand the point of this, just saying an existing codebase importing things this way doesn't seem all that hard to convert if you need to get off Deno.