5 lines
6.0 KiB
JSON

{
"id": "cli/run",
"title": "ng run",
"contents": "\n<article>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular-cli/edit/master/packages/angular/cli/commands/run.json?message=docs(...)%3A%20describe%20your%20change...\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular-cli/tree/v12.0.0-next.7/packages/angular/cli/commands/run.json\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n \n\n\n<div class=\"breadcrumb\">\n <script type=\"application/ld+json\">\n {\n \"@context\": \"http://schema.org\",\n \"@type\": \"BreadcrumbList\",\n \"itemListElement\": [\n { \"@type\": \"ListItem\", \"position\": 1, \"item\": { \"@id\": \"https://angular.io/cli\", \"name\": \"CLI\" } },\n { \"@type\": \"ListItem\", \"position\": 2, \"item\": { \"@id\": \"https://angular.io/cli/run\", \"name\": \"run\" } }\n ]\n }\n </script>\n <a href=\"cli\">CLI</a>\n</div>\n\n \n<header class=\"cli-header\">\n <h1 id=\"ng-run\">ng run<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"cli/run#ng-run\"><i class=\"material-icons\">link</i></a></h1>\n</header>\n\n\n <aio-toc class=\"embedded\"></aio-toc>\n\n <div class=\"cli-body\">\n \n <p>Runs an Architect target with an optional custom builder configuration defined in your project.</p>\n\n \n<code-example hidecopy=\"true\" class=\"no-box api-heading no-auto-link\">ng <span class=\"cli-name\">run</span> &#x3C;<var>target</var>> [<var>options</var>]</code-example>\n\n\n\n \n <h2 class=\"no-anchor\" id=\"mode_edit---code----------description\">\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular-cli/edit/master/packages/angular/cli/commands/run-long.md?message=docs%3A%20describe%20your%20change...\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular-cli/tree/v12.0.0-next.7/packages/angular/cli/commands/run-long.md\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n Description\n </h2>\n <p>Architect is the tool that the CLI uses to perform complex tasks such as compilation, according to provided configurations.\nThe CLI commands run Architect targets such as <code>build</code>, <code>serve</code>, <code>test</code>, and <code>lint</code>.\nEach named target has a default configuration, specified by an \"options\" object,\nand an optional set of named alternate configurations in the \"configurations\" object.</p>\n<p>For example, the \"serve\" target for a newly generated app has a predefined\nalternate configuration named \"production\".</p>\n<p>You can define new targets and their configuration options in the \"architect\" section\nof the <code>angular.json</code> file.\nIf you do so, you can run them from the command line using the <code>ng run</code> command.\nExecute the command using the following format.</p>\n<code-example>\nng run project:target[:configuration]\n</code-example>\n\n \n\n \n\n<h2 class=\"no-anchor\" id=\"arguments\">Arguments</h2>\n<table class=\"is-full-width list-table property-table\">\n <thead>\n <tr>\n <th width=\"15%\">Argument</th>\n <th width=\"40%\">Description</th>\n <th>Value Type</th>\n </tr>\n </thead>\n <tbody>\n \n <tr class=\"cli-option\">\n <td><code class=\"cli-option-syntax no-auto-link\">&#x3C;<var>target</var>></code></td>\n <td>\n <p>The Architect target to run.</p>\n\n \n </td>\n <td><code class=\"cli-option-syntax no-auto-link\">string</code></td>\n </tr>\n \n </tbody>\n</table>\n\n\n \n\n<h2 class=\"no-anchor\" id=\"options\">Options</h2>\n<table class=\"is-full-width list-table property-table\">\n <thead>\n <tr>\n <th width=\"15%\">Option</th>\n <th width=\"40%\">Description</th>\n <th>Value Type</th>\n <th>Default Value</th>\n </tr>\n </thead>\n <tbody>\n \n <tr class=\"cli-option\">\n <td>\n <code class=\"cli-option-syntax no-auto-link\">--configuration</code>\n </td>\n <td>\n \n <p>One or more named builder configurations as a comma-separated list as specified in the \"configurations\" section of angular.json.\nThe builder uses the named configurations to run the given target.\nFor more information, see <a href=\"https://angular.io/guide/workspace-config#alternate-build-configurations\">https://angular.io/guide/workspace-config#alternate-build-configurations</a>.</p>\n\n <p><span class=\"cli-aliases\">Aliases:</span> -c</p>\n </td>\n <td><code class=\"no-auto-link\">string</code></td>\n <td></td>\n </tr>\n \n <tr class=\"cli-option\">\n <td>\n <code class=\"cli-option-syntax no-auto-link\">--help</code>\n </td>\n <td>\n \n <p>Shows a help message for this command in the console.</p>\n\n \n </td>\n <td><code class=\"no-auto-link\">true|false|json|JSON</code></td>\n <td><code class=\"no-auto-link\">false</code></td>\n </tr>\n \n </tbody>\n</table>\n\n\n \n </div>\n</article>\n\n<!-- links to this doc:\n - cli\n - guide/cli-builder\n - guide/glossary\n-->\n<!-- links from this doc:\n - cli\n - cli/run#ng-run\n - https://angular.io/guide/workspace-config#alternate-build-configurations\n - https://github.com/angular/angular-cli/edit/master/packages/angular/cli/commands/run-long.md?message=docs%3A%20describe%20your%20change...\n - https://github.com/angular/angular-cli/edit/master/packages/angular/cli/commands/run.json?message=docs(...)%3A%20describe%20your%20change...\n - https://github.com/angular/angular-cli/tree/v12.0.0-next.7/packages/angular/cli/commands/run-long.md\n - https://github.com/angular/angular-cli/tree/v12.0.0-next.7/packages/angular/cli/commands/run.json\n-->"
}