← 返回命令列表

Linux command

ng-deploy 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Deploy the default project

ng deploy

Deploy a specific project

ng deploy [project-name]

Deploy with a build configuration

ng deploy --configuration production

Deploy without building first

ng deploy --no-build

说明

ng deploy builds and deploys an Angular application to a remote hosting provider. The deploy command requires a deployment builder to be configured in the project's angular.json file, which is typically set up by adding a hosting provider package such as @angular/fire, @azure/ng-deploy, or @netlify-builder/deploy. The command first runs the build process and then invokes the configured builder to upload the output to the target hosting environment.

参数

--configuration _name_
Build configuration to use for deployment.
--no-build
Skip the build step before deploying.
--help
Display help information.

FAQ

What is the ng-deploy command used for?

ng deploy builds and deploys an Angular application to a remote hosting provider. The deploy command requires a deployment builder to be configured in the project's angular.json file, which is typically set up by adding a hosting provider package such as @angular/fire, @azure/ng-deploy, or @netlify-builder/deploy. The command first runs the build process and then invokes the configured builder to upload the output to the target hosting environment.

How do I run a basic ng-deploy example?

Run `ng deploy` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --configuration _name_ do in ng-deploy?

Build configuration to use for deployment.