I'm a full stack software engineer, linux system administrator, tech support specialist, and LGBT+ rights activist. I love old technology and collect old computers. Come say hi!
It's long but not because of deno rather than the nature of using web urls. if the script is http://google.com/script.ts then that would be the url, if the url is large then it's large...
My problem with versioned url imports in source files is that for all but the smallest projects, you probably have to use those imports in several files.
I'd probably want to abstract that somehow, which then ends up looking a lot like a dependency spec file like package.json...
It's clearly possible to do this. Perhaps it's just a misunderstanding as a result of how articles like this are worded when it comes to dependency management. Talking about 'not having a package.json and instead uses URL imports' is kind of a moot point when in many cases you'd use one anyway, just not JSON.
It seems weird to make the point of calling it out as a difference between node and deno, but is it really any different?
I'm a full stack software engineer, linux system administrator, tech support specialist, and LGBT+ rights activist. I love old technology and collect old computers. Come say hi!
Yes as there isn't any package/meta files in a project using Deno. That's kind of the point I'm trying to make. The directory and file structure is a lot cleaner as the formatter, linter, package manager, etc is all built into the executable.
I'm a full stack software engineer, linux system administrator, tech support specialist, and LGBT+ rights activist. I love old technology and collect old computers. Come say hi!
They haven't moved to them completely, but they are supported. The main issue with them moving to ES modules is a lot of people still use require and other CommonJS features.
I'm a full stack software engineer, linux system administrator, tech support specialist, and LGBT+ rights activist. I love old technology and collect old computers. Come say hi!
Managing deps is hard 😐 With NPM the problem is a disk space and
package-lock.json
which noone likes; with Deno it's having quite weird long imports:Not sure what's worse 🤷🏻♂️ Anybody has an idea?
import_map.json, which is also web compatible.
If you need more features, try deps.ts
There's some websites that help shorten it
It's long but not because of deno rather than the nature of using web urls. if the script is
http://google.com/script.ts
then that would be the url, if the url is large then it's large...My problem with versioned url imports in source files is that for all but the smallest projects, you probably have to use those imports in several files.
I'd probably want to abstract that somehow, which then ends up looking a lot like a dependency spec file like package.json...
So you replace
package.json
with itsjs
(ts
) analogue... What's the point? No sarcasm, I just don't get it 😕It's clearly possible to do this. Perhaps it's just a misunderstanding as a result of how articles like this are worded when it comes to dependency management. Talking about 'not having a package.json and instead uses URL imports' is kind of a moot point when in many cases you'd use one anyway, just not JSON.
It seems weird to make the point of calling it out as a difference between node and deno, but is it really any different?
You can indeed use simply import_map.json.
The point of Deno is further adherance to web standard, even forced sometimes.
Another point is security of Node.js can be better.
Yes as there isn't any package/meta files in a project using Deno. That's kind of the point I'm trying to make. The directory and file structure is a lot cleaner as the formatter, linter, package manager, etc is all built into the executable.
i think as time goes bye, node.js modues will also change. node.js already moves to esm modules.
They haven't moved to them completely, but they are supported. The main issue with them moving to ES modules is a lot of people still use
require
and other CommonJS features.some people have a
deps.ts
file exporting everything:You can also
Also, this is possible
github.com/WICG/import-maps to the rescue!
I use npm without
package-lock.json
: I make my build package all dependencies at the time of build so that they won't change on different platforms (integration, test, qa, production...).My take on Continuous Integration
Mac ・ Sep 2 ・ 5 min read
This where
import_maps
deno.land/manual/linking_to_extern... comes to rescue!Its simple as create a import.json (ex)
and import like this in
.ts
import { App } from "alosaur/mod.ts";
and pass the imports.json with
--unstable
flag when you run deno.Take look at this example github.com/alosaur/alosaur-schematics