填寫這份《一分鐘調查》,幫我們(開發組)做得更好!去填寫Home

ng deploy

為指定的專案或預設專案,執行部署建構器。

Invokes the deploy builder for a specified project or for the default project in the workspace.

      
      ng deploy <project> [options]
    

說明

該命令採用可選的專案名稱,和 angular.json 工作區配置檔案 projects 部分中所指定的一樣。如果未提供專案名稱,則為預設專案執行 deploy 建構器。

The command takes an optional project name, as specified in the projects section of the angular.json workspace configuration file. When a project name is not supplied, executes the deploy builder for the default project.

要使用 ng deploy 命令,請使用 ng add 來新增一個實現部署目標平臺的功能的套件。新增軟體包會自動更新你的工作區配置,並新增一個部署用的 CLI 建構器。例如:

To use the ng deploy command, use ng add to add a package that implements deployment capabilities to your favorite platform. Adding the package automatically updates your workspace configuration, adding a deployment CLI builder. For example:

      
      "projects": {
  "my-project": {
    ...
    "architect": {
      ...
      "deploy": {
        "builder": "@angular/fire:deploy",
        "options": {}
      }
    }
  }
}
    

引數

引數說明Value Type
<project>

要部署的專案名。

The name of the project to deploy.

string

選項

選項說明Value TypeDefault Value
--configuration

建構器的一個或多個命名配置,是一個逗號分隔的列表,就像在 angular.json 的 "configurations" 部分指定的一樣。 本建構器使用這些命名配置來執行給定的目標。 欲知詳情,參見 https://angular.cn/guide/workspace-config#alternate-build-configurations。

One or more named builder configurations as a comma-separated list as specified in the "configurations" section of angular.json. The builder uses the named configurations to run the given target. For more information, see https://angular.io/guide/workspace-config#alternate-build-configurations.

別名: -c

string
--help

在控制檯顯示關於本命令的幫助資訊。

Shows a help message for this command in the console.

true|false|json|JSONfalse