Savory / Danet-Starter

A basic Danet app to help you build awesome API
MIT License
5 stars 4 forks source link

more clean in Danet Starter ( deps readibility ) #3

Closed elycheikhsmail closed 2 years ago

elycheikhsmail commented 2 years ago

more clean in Danet Starter ( deps readibility )

in most time we compare Danet Starter with Nestjs project, in Nest proeject whem we read :

import {POST} from 'nestjs/common'

we understand that POST function belong to 'nestjs/common' module

but when read :


import { POST } from 'dep.ts'

we can't be sure that POST function is in danet module befor reading deps.ts content (may be the example is not expressive but you can understand what I mean)

SUGGESTION:

I suggess that deps should be stored in forld (deps) instead of file (deps.ts), in actual Danet Starter, deps folder structure shoud be something like :

├── deps
│   ├── danet.ts
│   ├── mongo.ts
│   └── postgres.ts

the content of each file trivial (I think)

or maybe :

├── deps
│   └── deno.land
│       └── x
│           ├── danet.ts
│           ├── mongo.ts
│           └── postgres.ts
Sorikairox commented 2 years ago

Thanks for your input !

I think that your idea, which we discussed on discord, of using import_map.json might the best solution!

elycheikhsmail commented 2 years ago

ok