Skip to content

Commit

Permalink
fix(docs): remove deprecated usage of npm ci --only
Browse files Browse the repository at this point in the history
  • Loading branch information
erfanium committed Mar 23, 2023
1 parent add894a commit 892f847
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions pages/en/docs/guides/nodejs-docker-webapp.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ COPY package*.json ./
RUN npm install
# If you are building your code for production
# RUN npm ci --only=production
# RUN npm ci --omit=dev
```

Note that, rather than copying the entire working directory, we are only copying
Expand Down Expand Up @@ -156,7 +156,7 @@ COPY package*.json ./
RUN npm install
# If you are building your code for production
# RUN npm ci --only=production
# RUN npm ci --omit=dev
# Bundle app source
COPY . .
Expand Down
4 changes: 2 additions & 2 deletions pages/id/docs/guides/nodejs-docker-webapp.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ COPY package*.json ./
RUN npm install
# If you are building your code for production
# RUN npm ci --only=production
# RUN npm ci --omit=dev
```

Perhatikan bahwa, daripada menyalin seluruh direktori kerja, kami hanya menyalin berkas `package.json`. Ini memungkinkan kami untuk memanfaatkan Docker yang di-cache lapisan. bitJudo memiliki penjelasan yang bagus tentang ini [di sini](http://bitjudo.com/blog/2014/03/13/building-efficient-dockerfiles-node-dot-js/). Selanjutnya, perintah `npm ci`, yang ditentukan dalam komentar, membantu menyediakan build yang lebih cepat, andal, dan dapat direproduksi untuk lingkungan produksi. Anda dapat membaca lebih lanjut tentang ini [di sini](https://blog.npmjs.org/post/171556855892/introducing-npm-ci-for-faster-more-reliable).
Expand Down Expand Up @@ -128,7 +128,7 @@ COPY package*.json ./
RUN npm install
# If you are building your code for production
# RUN npm ci --only=production
# RUN npm ci --omit=dev
# Bundle app source
COPY . .
Expand Down
8 changes: 4 additions & 4 deletions pages/ko/docs/guides/nodejs-docker-webapp.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ COPY package*.json ./
RUN npm install
# If you are building your code for production
# RUN npm ci --only=production
# RUN npm ci --omit=dev
```
-->

Expand All @@ -225,7 +225,7 @@ COPY package*.json ./
RUN npm install
# 프로덕션을 위한 코드를 빌드하는 경우
# RUN npm ci --only=production
# RUN npm ci --omit=dev
```

<!--
Expand Down Expand Up @@ -296,7 +296,7 @@ COPY package*.json ./
RUN npm install
# If you are building your code for production
# RUN npm ci --only=production
# RUN npm ci --omit=dev
# Bundle app source
COPY . .
Expand Down Expand Up @@ -328,7 +328,7 @@ COPY package*.json ./
RUN npm install
# 프로덕션을 위한 코드를 빌드하는 경우
# RUN npm ci --only=production
# RUN npm ci --omit=dev
# 앱 소스 추가
COPY . .
Expand Down
4 changes: 2 additions & 2 deletions pages/ru/docs/guides/nodejs-docker-webapp.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ COPY package*.json ./
RUN npm install
# Если вы создаете сборку для продакшн
# RUN npm ci --only=production
# RUN npm ci --omit=dev
```

Обратите внимание, что вместо того, чтобы копировать весь рабочий каталог,
Expand Down Expand Up @@ -161,7 +161,7 @@ COPY package*.json ./
RUN npm install
# Если вы создаете сборку для продакшн
# RUN npm ci --only=production
# RUN npm ci --omit=dev
# копируем исходный код
COPY . .
Expand Down
4 changes: 2 additions & 2 deletions pages/zh-cn/docs/guides/nodejs-docker-webapp.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ COPY package*.json ./
RUN npm install
# If you are building your code for production
# RUN npm ci --only=production
# RUN npm ci --omit=dev
```

请注意,我们只是拷贝了 `package.json` 文件而非整个工作目录。这允许我们利用缓存 Docker 层的优势。bitJudo 对此有一个很好的解释,请[见此](http://bitjudo.com/blog/2014/03/13/building-efficient-dockerfiles-node-dot-js/)
Expand Down Expand Up @@ -130,7 +130,7 @@ COPY package*.json ./
RUN npm install
# If you are building your code for production
# RUN npm ci --only=production
# RUN npm ci --omit=dev
# Bundle app source
COPY . .
Expand Down

0 comments on commit 892f847

Please sign in to comment.