From 35313dc30011765a4d6b90aec2be53148eb073ce Mon Sep 17 00:00:00 2001 From: Judy Bogart <31899326+jbogarthyde@users.noreply.github.com> Date: Thu, 22 Aug 2019 10:14:38 -0700 Subject: [PATCH] Add deploy command doc (#15402) * docs: add deploy command doc * docs: fix json example * docs: add link to cli builder doc * docs: remove link * docs: restore link --- packages/angular/cli/commands/deploy-long.md | 27 +++++++++++++++----- packages/angular/cli/commands/deploy.json | 2 +- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/packages/angular/cli/commands/deploy-long.md b/packages/angular/cli/commands/deploy-long.md index d8b66e1e5a56..5d600ef2e8d8 100644 --- a/packages/angular/cli/commands/deploy-long.md +++ b/packages/angular/cli/commands/deploy-long.md @@ -1,9 +1,22 @@ -The `ng deploy` command is a shortcut for: +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 run [PROJECT_NAME]:deploy -``` +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](guide/cli-builder). +For example: -It 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, the CLI will execute the `deploy` builder for the default project. +```json +"projects": { + "my-project": { + ... + "architect": { + ... + "deploy": { + "builder": "@angular/fire:deploy", + "options": {} + } + } + } + } + ``` \ No newline at end of file diff --git a/packages/angular/cli/commands/deploy.json b/packages/angular/cli/commands/deploy.json index 09117c873ecd..12a32dca84a3 100644 --- a/packages/angular/cli/commands/deploy.json +++ b/packages/angular/cli/commands/deploy.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/schema", "$id": "ng-cli://commands/deploy.json", - "description": "Invokes the deploy builder for a specified project. If no project is specified, the CLI will invoke the deploy builder for the default project in the workspace.", + "description": "Invokes the deploy builder for a specified project or for the default project in the workspace.", "$longDescription": "./deploy-long.md", "$aliases": [ "d" ],