5 lines
6.0 KiB
JSON
Raw Permalink Normal View History

{
"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%\">Op
}