| ▲ | flohofwoe 5 hours ago | |
> ...pretty much any functionality provided to deno is available for node as well. Unfortunately Node still can't do something like this out of the box (AFAIK at least):
Such direct imports are basically the killer feature of Deno for simple standalone tooling scripts in otherwise non-JS/TS projects, e.g. it made TS a perfect replacement for Python even without a "batteries included" standard library.Deno also has a builtin TS type checker, linter, formatter, test runner with coverage support, package manager, language server etc etc... In node these are all separate (and often 3rd-party) tools. | ||
| ▲ | mahboi 3 hours ago | parent | next [-] | |
This doesn't seem like a big deal. Don't you just npm install whatever you need and then change the import names? | ||
| ▲ | michaelmior an hour ago | parent | prev | next [-] | |
FWIW, almost this exact syntax for imports (without the `npm:` prefix) is supported for standalone scripts with Bun. | ||
| ▲ | ecares 3 hours ago | parent | prev [-] | |
this one is actually a bad pattern to avoid. | ||