ryann
ryann
DDeno
Created by ryann on 11/12/2024 in #help
imports or deps.ts
Hi! I'm trying to create my first Deno app. I'm trying to dockerize it and the Dockerfile has this line:
# Cache the dependencies as a layer (the following two steps are re-run only when deps.ts is modified).
# Ideally cache deps.ts will download and compile _all_ external files used in main.ts.
COPY deps.ts .
RUN deno install --entrypoint deps.ts
# Cache the dependencies as a layer (the following two steps are re-run only when deps.ts is modified).
# Ideally cache deps.ts will download and compile _all_ external files used in main.ts.
COPY deps.ts .
RUN deno install --entrypoint deps.ts
But all my imports are in deno.json
{
"tasks": {
"dev": "docker build -t app . && docker run -it -p 1993:1993 app"
},
"imports": {
"@std/assert": "jsr:@std/assert@^1.0.7"
}
}
{
"tasks": {
"dev": "docker build -t app . && docker run -it -p 1993:1993 app"
},
"imports": {
"@std/assert": "jsr:@std/assert@^1.0.7"
}
}
So I was wondering, is deps.ts an old way of importing things? Which one is the preferred way?
2 replies