export * as Oak from "https://deno.land/x/oak/mod.ts";
export * as Postgres from "https://deno.land/x/postgres/mod.ts";
Then you do this: import { Oak, Postgres } from "./deps.ts"; export * as Oak from "https://deno.land/x/oak/mod.ts";
export * as Postgres from "https://deno.land/x/postgres/mod.ts";
Then you do this: import { Oak, Postgres } from "./deps.ts";I know you can do this, but then you can't do
import { Function1, Function2 } from "oak";
You could do import { Oak } from "./deps.ts";
const { Function1, Function2 } = Oak;
But that is still an awful workaround.It updates your dependencies. https://github.com/hayd/deno-udd
There are one or two more feature rich ones. The need for deps.ts can be eliminated with management tools which work with your imports directly.
If something like that is needed, then I think deno should attempt to come with something for managing dependencies.
Eventually, developer convinience will win, and everyone will settle on some sort of package manager for deno. It'd probably be for the best if deno made it official as, personally, I think this is heading towards a second NPM.
There are no plans to add such convenience in the binary because it would mean limiting places you can import from (cannot upgrade deps for unsupported registries). Deno binary will remain agnostic to where you import from.
Community will come up with something if it's a huge problem and settle eventually.
import { Oak: {Function1, Function2} } from "./deps.ts";
import { Function1, Function2} from "https://deno.land/x/oak/mod.ts";
In the file that needs them? Though then you have a lot of redundant URLs everywhere and god knows how auto-imports could work.Or perhaps you could do
// deps/oak.ts
export * from "https://deno.land/x/oak/mod.ts";
and then you'd do import { Function1, Function2 } from './deps/oak';
I am not a fan of any of these.