📅  最后修改于: 2020-10-27 02:40:57             🧑  作者: Mango
ng run project:target[:configuration]
ng run命令可使用项目中angular.json中定义的可选自定义构建器配置来运行Architect目标。这里project是angular.json中定义的应用程序的名称。选项是可选参数。
Sr.No. | Argument & Syntax | Description |
---|---|---|
1 | Architect target to run. |
Sr.No. | Option & Syntax | Description |
---|---|---|
1 | –configuration=configuration |
A named builder configuration, defined in the “configurations” section of angular.json. The builder uses the named configuration to run the given target. Aliases: -c. |
2 | –help=true|false|json|JSON |
Shows a help message for this command in the console. Default: false. |
首先移至使用ng generate命令更新的角度项目,然后运行该命令。
\>Node\>TutorialsPoint> ng run TutorialsPoint:build
Generating ES5 bundles for differential loading...
ES5 bundle generation complete.
chunk {polyfills} polyfills-es2015.js, polyfills-es2015.js.map (polyfills) 141 kB [initial] [rendered]
chunk {polyfills-es5} polyfills-es5.js, polyfills-es5.js.map (polyfills-es5) 656 kB [initial] [rendered]
chunk {main} main-es2015.js, main-es2015.js.map (main) 12.9 kB [initial] [rendered]
chunk {main} main-es5.js, main-es5.js.map (main) 15.1 kB [initial] [rendered]
chunk {runtime} runtime-es2015.js, runtime-es2015.js.map (runtime) 6.16 kB [entry] [rendered]
chunk {runtime} runtime-es5.js, runtime-es5.js.map (runtime) 6.16 kB [entry] [rendered]
chunk {styles} styles-es2015.js, styles-es2015.js.map (styles) 12.4 kB [initial] [rendered]
chunk {styles} styles-es5.js, styles-es5.js.map (styles) 13.9 kB [initial] [rendered]
chunk {vendor} vendor-es2015.js, vendor-es2015.js.map (vendor) 2.66 MB [initial] [rendered]
chunk {vendor} vendor-es5.js, vendor-es5.js.map (vendor) 3.11 MB [initial] [rendered]
Date: 2020-06-04T02:31:28.919Z - Hash: dd73885c28e550d01341 - Time: 13742ms
ng build命令在这里成功构建了我们的项目TutorialsPoint。