← 返回命令列表

Linux command

ng-run 命令

文件

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

常用示例

Run architect target

ng run [project]:[target]

Run with configuration

ng run [project]:[target]:[configuration]

Run custom builder

ng run [project]:build:production

说明

ng run executes an Architect target defined in angular.json. It is the low-level command used to invoke builders and can run custom builders or targets not covered by dedicated commands like ng build, ng serve, or ng test. Any options accepted by the underlying builder may be appended after the target name. Part of the Angular CLI.

参数

--help
Display help for the specified target.
--configuration _name_, -c _name_
Named builder configuration to use (alternative to third colon-separated segment).

FAQ

What is the ng-run command used for?

ng run executes an Architect target defined in angular.json. It is the low-level command used to invoke builders and can run custom builders or targets not covered by dedicated commands like ng build, ng serve, or ng test. Any options accepted by the underlying builder may be appended after the target name. Part of the Angular CLI.

How do I run a basic ng-run example?

Run `ng run [project]:[target]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --help do in ng-run?

Display help for the specified target.