ng help

中文翻譯

ng help

ng build <options ...>

構(gòu)建您的應(yīng)用程序并將其放入輸出路徑(dist /默認(rèn)情況下)。

別名:b

--target(String)(默認(rèn)值:開發(fā))定義構(gòu)建目標(biāo)。

別名:-t <value>,-dev(--target = development),-prod(--target = production),--

target
<value>
--environment(String)定義構(gòu)建環(huán)境。

別名:-e <value>,--environment <value>

--output-path(Path)要放置輸出的路徑。

別名:-op <value>,--

outputPath
<value>
--aot(Boolean)構(gòu)建使用時間編譯。

別名:-aot

--sourcemaps(Boolean)輸出源地圖。

別名:-sm,--sourcemap,--sourcemaps

--vendor-chunk(Boolean)使用僅包含供應(yīng)商庫的單獨的包。

別名:-vc,--vendorChunk

--common-chunk(Boolean)(默認(rèn)值:true)使用單獨的包含多個捆綁包中使用的代碼。

別名:-cc,--commonChunk

--base-href(String)正在構(gòu)建的應(yīng)用程序的基本URL。

別名:-bh <value>,--baseHref <value> --deploy

-url(String)將部署文件的URL。

別名:-d <value>,--deployUrl <value>

--verbose(Boolean)(默認(rèn)值:false)向輸出日志記錄添加更多詳細(xì)信息。

別名:-v,--

verbose --progress(Boolean)(默認(rèn)值:true)在建立時將進(jìn)度記錄到控制臺。

別名:-pr,--progress

--i18n-file(String)用于i18n的本地化文件。

別名:--i18nFile <value>

--i18n-format(String)使用-i18n-file指定的本地化文件的格式。

別名:--i18nFormat <value>

--locale(String)要用于i18n的區(qū)域設(shè)置。

別名:--locale <value> --extract

-css(Boolean)將css從全局樣式提取到css文件而不是js一個。

別名:-ec,--

extractCss --watch(Boolean)(默認(rèn)值:false)文件更改時運行構(gòu)建。

別名:-w,--watch

--output-hashing = none | all | media | bundles(String)定義輸出文件名cache-busting散列模式。

別名:-oh <value>,--outputHashing <value>

--poll(Number)啟用并定義查看輪詢時間段(毫秒)的文件。

別名:-poll <value>

--app(String)指定要使用的應(yīng)用程序名稱或索引。

別名:-a <value>,-app <value>

--delete-output-path(Boolean)(默認(rèn)值:true)刪除生成前的輸出路徑。

別名:-dop,

--
deleteOutputPath
--preserve-symlinks(Boolean)(默認(rèn)值:false)解析模塊時請勿使用實際路徑。

別名:--preserveSymlinks

--extract-licenses(Boolean)(默認(rèn)值:true)在單獨的文件中提取所有許可證,僅在生產(chǎn)構(gòu)建的情況下。

別名:--extractLicenses

--show-circular-dependencies(Boolean)(默認(rèn)值:true)在構(gòu)建上顯示循環(huán)依賴性警告。

別名:-scd,--showCircularDependencies

--build-optimizer(Boolean)(默認(rèn)值:false)(實驗)使用時,啟用@ angular-devkit / build-optimizer優(yōu)化

--aot

別名:--buildOptimizer

--named-chunks(Boolean)為延遲加載的塊使用文件名。

別名:-NC,--namedChunks

--stats-JSON(布爾值)(默認(rèn)值:false)生成一個

stats.json
其可以使用工具,如被分析的文件:

webpack-bundle-analyzer

[https://webpack.github.io/analyse

](https://webpack.github.io/analyse)。

別名:--statsJson

ng完成<options ...>

將自動完成功能添加到

ng
命令和子命令。

--all(Boolean)(默認(rèn)值:true)生成與bash和zsh兼容的完成腳本。

別名:-a,-all

--bash(Boolean)(默認(rèn)值:false)為bash生成完成腳本。

別名:-b,-bash

--zsh(Boolean)(默認(rèn)值:false)為zsh生成完成腳本。

別名:-z,-zsh

ng doc <keyword> <options ...>

打開給定關(guān)鍵字的Angular API文檔。

--search(Boolean)(默認(rèn)值:false)搜索整個angular.io而不僅僅是api。

別名:-s,--search

ng e2e <options ...>

在現(xiàn)有項目中運行e2e測試。

別名:e

--target(String)(默認(rèn)值:開發(fā))定義構(gòu)建目標(biāo)。

別名:-t <value>,-dev(--target = development),-prod(--target = production),--

target
<value>
--environment(String)定義構(gòu)建環(huán)境。

別名:-e <value>,--environment <value>

--output-path(Path)要放置輸出的路徑。

別名:-op <value>,--

outputPath
<value>
--aot(Boolean)構(gòu)建使用時間編譯。

別名:-aot

--sourcemaps(Boolean)輸出源地圖。

別名:-sm,--

sourcemap,--sourcemaps --vendor-chunk(Boolean)使用僅包含供應(yīng)商庫的單獨包。

別名:-vc,--vendorChunk

--common-chunk(Boolean)(默認(rèn)值:true)使用單獨的包含多個捆綁包中使用的代碼。

別名:-cc,--commonChunk

--base-href(String)正在構(gòu)建的應(yīng)用程序的基本URL。

別名:-bh <value>,--baseHref <value> --deploy

-url(String)將部署文件的URL。

別名:-d <value>,--deployUrl <value>

--verbose(Boolean)(默認(rèn)值:false)向輸出日志記錄添加更多詳細(xì)信息。

別名:-v,--

verbose --progress(Boolean)(默認(rèn)值:true)在建立時將進(jìn)度記錄到控制臺。

別名:-pr,--progress

--i18n-file(String)用于i18n的本地化文件。

別名:--i18nFile <value>

--i18n-format(String)使用--i18n-file指定的本地化文件的格式。

別名:--i18nFormat <value>

--locale(String)要用于i18n的區(qū)域設(shè)置。

別名:--locale <value> --extract

-css(Boolean)將css從全局樣式提取到css文件而不是js一個。

別名:-ec,--

extractCss --watch(Boolean)(默認(rèn)值:false)文件更改時運行構(gòu)建。

別名:-w,--watch

--output-hashing = none | all | media | bundles(String)定義輸出文件名cache-busting散列模式。

別名:-oh <value>,--

outputHashing
<value>
--poll(Number)啟用并定義查看輪詢時間段(毫秒)的文件。

別名:-poll <value>

--app(String)指定要使用的應(yīng)用程序名稱或索引。

別名:-a <value>,-app <value>

--delete-output-path(Boolean)(默認(rèn)值:true)刪除生成前的輸出路徑。

別名:-dop,

--
deleteOutputPath
--preserve-symlinks(Boolean)(默認(rèn)值:false)解析模塊時請勿使用實際路徑。

別名:--preserveSymlinks

--extract-licenses(Boolean)(默認(rèn)值:true)在單獨的文件中提取所有許可證,僅在生產(chǎn)構(gòu)建的情況下。

別名:--extractLicenses

--show-circular-dependencies(Boolean)(默認(rèn)值:true)在構(gòu)建上顯示循環(huán)依賴性警告。

別名:-scd,--showCircularDependencies

--build-optimizer(Boolean)(默認(rèn)值:false)(實驗)使用時,啟用@ angular-devkit / build-optimizer優(yōu)化

--aot

別名:--buildOptimizer

--named-chunks(Boolean)為延遲加載的塊使用文件名。

別名:-nc,--namedChunks

--port(Number)(默認(rèn)值:0)用于提供應(yīng)用程序的端口。

別名:-p <value>,-port <value>

--host(String)(默認(rèn)值:localhost)默認(rèn)情況下僅偵聽localhost。

別名:-H <value>,-

host
<value>
--proxy-config(路徑)代理配置文件。

別名:-pc <value>,--proxyConfig <value>

--ssl(Boolean)(默認(rèn)值:false)使用HTTPS進(jìn)行服務(wù)。

別名:-ssl

--ssl-key(String)(默認(rèn)值:ssl / server.key)用于提供HTTPS的SSL密鑰。

別名:--sslKey <value>

--ssl-cert(String)(默認(rèn)值:ssl / server.crt)用于提供HTTPS的SSL證書。

別名:--sslCert <value>

--open(Boolean)(默認(rèn)值:false)在默認(rèn)瀏覽器中打開url。

別名:-o,

-open --live-reload(Boolean)(默認(rèn)值:true)是否使用live-reload重新加載頁面。

別名:-lr,--liveReload

--public-host(String)指定瀏覽器客戶端將使用的URL。

別名:--live-reload-client <value>,--publicHost <value>

--disable-host-check(Boolean)(默認(rèn)值:false)不驗證連接的客戶端是允許的主機(jī)的一部分。

別名:--disableHostCheck

--hmr(Boolean)(默認(rèn)值:false)啟用熱模塊更換。

別名:-hmr

--config(String)使用特定的配置文件。
默認(rèn)為angular-cli.json中的量角器配置文件。

別名:-c <value>,--

config
<value>
--specs(Array)(默認(rèn)

:)覆蓋量角器配置中的specs。
可以通過重復(fù)標(biāo)志(ng e2e --specs = spec1.ts --specs = spec2.ts)發(fā)送多個規(guī)格。

別名:-sp <value>,--specs <value>

--element-explorer(Boolean)(默認(rèn)值:false)啟動Protector的Element Explorer進(jìn)行調(diào)試。

別名:-ee,--elementExplorer

--webdriver-update(Boolean)(默認(rèn)值:true)嘗試更新webdriver。

別名:-wu,--webdriverUpdate

--serve(Boolean)(默認(rèn)值:true)編譯并提供服務(wù)。
所有非重新加載相關(guān)的服務(wù)選項也可用(例如--port = 4400)。

別名:-s,--serve

ng彈出<選項...>

彈出您的應(yīng)用程序并輸出正確的Webpack配置和腳本。

--target(String)(默認(rèn):開發(fā))定義構(gòu)建目標(biāo)。

別名:-t <value>,-dev(--target = development),-prod(--target = production),--

target
<value>
--environment(String)定義構(gòu)建環(huán)境。

別名:-e <value>,--environment <value>

--output-path(Path)要放置輸出的路徑。

別名:-op <value>,--

outputPath
<value>
--aot(Boolean)構(gòu)建使用時間編譯。

別名:-aot

--sourcemaps(Boolean)輸出源地圖。

別名:-sm,--sourcemap,

別名:-vc,--vendorChunk

--common-chunk(Boolean)(默認(rèn)值:true)使用單獨的包含多個捆綁包中使用的代碼。

別名:-cc,--commonChunk

--base-href(String)正在構(gòu)建的應(yīng)用程序的基本URL。

別名:-bh <value>,--baseHref <value> --deploy

-url(String)將部署文件的URL。

別名:-d <value>,--deployUrl <value>

--verbose(Boolean)(默認(rèn)值:false)向輸出日志記錄添加更多詳細(xì)信息。

別名:-v,--

verbose --progress(Boolean)(默認(rèn)值:true)在建立時將進(jìn)度記錄到控制臺。

別名:-pr,--progress

--i18n-file(String)用于i18n的本地化文件。

別名:--i18nFile <value>

--i18n-format(String)使用--i18n-file指定的本地化文件的格式。

別名:--i18nFormat <value>

--locale(String)要用于i18n的區(qū)域設(shè)置。

別名:--locale <value> --extract

-css(Boolean)將css從全局樣式提取到css文件而不是js一個。

別名:-ec,--

extractCss --watch(Boolean)(默認(rèn)值:false)文件更改時運行構(gòu)建。

別名:-w,--watch

--output-hashing = none | all | media | bundles(String)定義輸出文件名cache-busting散列模式。

別名:-oh <value>,--

outputHashing
<value>
--poll(Number)啟用并定義查看輪詢時間段(毫秒)的文件。

別名:-poll <value>

--delete-output-path(Boolean)(默認(rèn)值:true)在構(gòu)建之前刪除輸出路徑。

別名:-dop,

--
deleteOutputPath
--preserve-symlinks(Boolean)(默認(rèn)值:false)解析模塊時請勿使用實際路徑。

別名:--preserveSymlinks

--extract-licenses(Boolean)(默認(rèn)值:true)在單獨的文件中提取所有許可證,僅在生產(chǎn)構(gòu)建的情況下。

別名:--extractLicenses

--show-circular-dependencies(Boolean)(默認(rèn)值:true)在構(gòu)建上顯示循環(huán)依賴性警告。

別名:-scd,--showCircularDependencies

--build-optimizer(Boolean)(默認(rèn)值:false)(實驗)使用時,啟用@ angular-devkit / build-optimizer優(yōu)化

--aot

別名:--buildOptimizer

--named-chunks(Boolean)為延遲加載的塊使用文件名。

別名:-nc,--namedChunks

--force(Boolean)覆蓋任何已存在的webpack.config.js和npm腳本。

別名:--

force --app(String)指定要使用的應(yīng)用程序名稱。

別名:-a <value>,-app <value>

ng生成<藍(lán)圖> <選項...>

根據(jù)藍(lán)圖生成和/或修改文件。

別名:g

--dry-run(Boolean)(默認(rèn)值:false)在不進(jìn)行任何更改的情況下運行。

別名:-d,--dryRun

--lint-fix(Boolean)使用lint在生成后修復(fù)文件。

別名:-lf,--lintFix

--verbose(Boolean)(默認(rèn)值:false)向輸出日志記錄添加更多詳細(xì)信息。

別名:-v,--verbose

ng get <options ...>

從配置獲取值。
示例:ng get [key]

--global(Boolean)(默認(rèn)值:false)獲取全局配置中的值(在您的主目錄中)。

別名: - 全球

ng help <command-name(默認(rèn)值:all)>

顯示CLI的幫助。

ng lint <options ...>

現(xiàn)有項目中的Lints代碼。

別名:l

--fix(Boolean)(默認(rèn)值:false)修復(fù)linting錯誤(可能覆蓋linted文件)。

別名:-fix

--type-check(Boolean)(默認(rèn)值:false)控制linting的類型檢查。

別名:--typeCheck

--force(Boolean)(默認(rèn)值:false)即使存在linting錯誤也會成功。

別名:--force

--format(String)(默認(rèn):散文)輸出格式(散文,json,時尚,詳細(xì),pmd,msbuild,checkstyle,vso,文件列表)。

別名:-t <value>,--format <value>

ng new <options ...>

創(chuàng)建一個新的目錄和一個新的Angular應(yīng)用程序,例如。
“ng new [name]”。

別名:n

--dry-run(Boolean)(默認(rèn)值:false)運行而不進(jìn)行任何更改。
將列出運行“ng new”時所創(chuàng)建的所有文件。

別名:-d,--dryRun

--verbose(Boolean)(默認(rèn)值:false)向輸出日志記錄添加更多詳細(xì)信息。

別名:-v,--verbose

--skip-install(Boolean)(默認(rèn)值:false)跳過安裝軟件包。

別名:-si,--skipInstall

--skip-git(Boolean)(默認(rèn)值:false)跳過初始化git存儲庫。

別名:-sg,--skipGit

--skip-tests(Boolean)(默認(rèn)值:false)跳過創(chuàng)建規(guī)范文件。

別名:-st,--skipTests

--skip-commit(Boolean)(默認(rèn)值:false)跳過提交第一個提交到git。

別名:-sc,--skipCommit

--directory(String)用于創(chuàng)建應(yīng)用程序的目錄名
。aliases

:-dir <value>,--directory <value>

--source-dir(String)(默認(rèn)值:src)源目錄的名稱。
您可以稍后更改“.angular-cli.json”(apps [0] .root)中的值。

別名:-sd <value>,--

sourceDir
<value>
--style(String)(默認(rèn)值:css)樣式文件默認(rèn)擴(kuò)展名。
可能的值:css,scss,less,sass,styl(stylus)。
您可以稍后更改“.angular-cli.json”(defaults.styleExt)中的值。

別名:--style <value>

--prefix(String)(默認(rèn)值:app)用于所有組件選擇器的前綴。
您可以稍后更改“.angular-cli.json”(apps [0] .prefix)中的值。

別名:-p <value>,--prefix <value>

--routing(Boolean)(默認(rèn)值:false)生成路由模塊。

別名:--routing

--inline-style(Boolean)(默認(rèn)值:false)應(yīng)該有一個內(nèi)聯(lián)樣式。

別名:-is,--inlineStyle

--inline-template(Boolean)(默認(rèn)值:false)應(yīng)該有一個內(nèi)聯(lián)模板。

別名:

-it
,--
inlineTemplate --minimal(Boolean)(默認(rèn)值:false)應(yīng)該創(chuàng)建一個最小的應(yīng)用程序。

別名: - 最小

ng服務(wù)<選項...>

構(gòu)建并提供應(yīng)用程序,重建文件更改。

別名:server,s

--target(String)(默認(rèn)值:development)定義構(gòu)建目標(biāo)。

別名:-t <value>,-dev(--target = development),-prod(--target = production),--

target
<value>
--environment(String)定義構(gòu)建環(huán)境。

別名:-e <value>,--environment <value>

--output-path(Path)要放置輸出的路徑。

別名:-op <value>,--

outputPath
<value>
--aot(Boolean)構(gòu)建使用時間編譯。

別名:-aot

--sourcemaps(Boolean)輸出源地圖。

別名:-sm,--sourcemap,--sourcemaps

--vendor-chunk(Boolean)使用僅包含供應(yīng)商庫的單獨的包。

別名:-vc,--vendorChunk

--common-chunk(Boolean)(默認(rèn)值:true)使用單獨的包含多個捆綁包中使用的代碼。

別名:-cc,--commonChunk

--base-href(String)正在構(gòu)建的應(yīng)用程序的基本URL。

別名:-bh <value>,--baseHref <value> --deploy

-url(String)將部署文件的URL。

別名:-d <value>,--deployUrl <value>

--verbose(Boolean)(默認(rèn)值:false)向輸出日志記錄添加更多詳細(xì)信息。

別名:-v,--

verbose --progress(Boolean)(默認(rèn)值:true)在建立時將進(jìn)度記錄到控制臺。

別名:-pr,--progress

--i18n-file(String)用于i18n的本地化文件。

別名:--i18nFile <value>

--i18n-format(String)使用-i18n-file指定的本地化文件的格式。

別名:--i18nFormat <value>

--locale(String)要用于i18n的區(qū)域設(shè)置。

別名:--locale <value> --extract

-css(Boolean)將css從全局樣式提取到css文件而不是js一個。

別名:-ec,--

extractCss --watch(Boolean)(默認(rèn)值:true)在更改時重建。

別名:-w,--watch

--output-hashing = none | all | media | bundles(String)定義輸出文件名cache-busting散列模式。

別名:-oh <value>,--outputHashing <value>

別名:-poll <value>

--app(String)指定要使用的應(yīng)用程序名稱或索引。

別名:-a <value>,-app <value>

--delete-output-path(Boolean)(默認(rèn)值:true)刪除生成前的輸出路徑。

別名:-dop,

--
deleteOutputPath
--preserve-symlinks(Boolean)(默認(rèn)值:false)解析模塊時請勿使用實際路徑。

別名:--preserveSymlinks

--extract-licenses(Boolean)(默認(rèn)值:true)在單獨的文件中提取所有許可證,僅在生產(chǎn)構(gòu)建的情況下。

別名:--extractLicenses

--show-circular-dependencies(Boolean)(默認(rèn)值:true)在構(gòu)建上顯示循環(huán)依賴性警告。

別名:-scd,--showCircularDependencies

--build-optimizer(Boolean)(默認(rèn)值:false)(實驗)使用時,啟用@ angular-devkit / build-optimizer優(yōu)化

--aot

別名:--buildOptimizer

--named-chunks(Boolean)為延遲加載的塊使用文件名。

別名:-nc,--namedChunks

--port(Number)(默認(rèn)值:4200)要監(jiān)聽的端口。

別名:-p <value>,-port <value>

--host(String)(默認(rèn)值:localhost)默認(rèn)情況下僅偵聽localhost。

別名:-H <value>,-

host
<value>
--proxy-config(路徑)代理配置文件。

別名:-pc <value>,--proxyConfig <value>

--ssl(Boolean)(默認(rèn)值:false)使用HTTPS進(jìn)行服務(wù)。

別名:-ssl

--ssl-key(String)(默認(rèn)值:ssl / server.key)用于提供HTTPS的SSL密鑰。

別名:--sslKey <value>

--ssl-cert(String)(默認(rèn)值:ssl / server.crt)用于提供HTTPS的SSL證書。

別名:--sslCert <value>

--open(Boolean)(默認(rèn)值:false)在默認(rèn)瀏覽器中打開url。

別名:-o,

-open --live-reload(Boolean)(默認(rèn)值:true)是否使用live-reload重新加載頁面。

別名:-lr,--liveReload

--public-host(String)指定瀏覽器客戶端將使用的URL。

別名:--live-reload-client <value>,--publicHost <value>

--disable-host-check(Boolean)(默認(rèn)值:false)不驗證連接的客戶端是允許的主機(jī)的一部分。

別名:--disableHostCheck

--hmr(Boolean)(默認(rèn)值:false)啟用熱模塊更換。

別名:-hmr

ng set <options ...>

在配置中設(shè)置一個值。

--global(Boolean)(默認(rèn)值:false)設(shè)置全局配置中的值,而不是在項目中。

別名:-g,--global

ng測試<選項...>

在現(xiàn)有項目中運行單元測試。

別名:t

--watch(Boolean)文件更改時運行構(gòu)建。

別名:-w,--watch

--code-coverage(Boolean)(默認(rèn)值:false)覆蓋率報告將在coverage /目錄中。

別名:-cc,--codeCoverage

--config(String)使用特定的配置文件。
默認(rèn)為.mat-cli.json中的karma配置文件。

別名:-c <value>,--config <value>

--single-run(Boolean)單次運行測試。

別名:-sr,--

singleRun --progress(Boolean)(默認(rèn)值:true)在進(jìn)程中將進(jìn)度記錄到控制臺。

別名:--progress

--browsers(String)覆蓋運行哪些瀏覽器測試。

別名:--browsers <value>

--colors(Boolean)啟用或禁用輸出(記者和日志)中的顏色。

別名:--colors

--log-level(String)記錄級別。

別名:--logLevel <value>

--port(Number)Web服務(wù)器將偵聽的端口。

別名:-port <value>

--reporters(String)要使用的記者名單。

別名:--reporters <value>

--sourcemaps(Boolean)(默認(rèn)值:true)輸出源映射。

別名:-sm,--

sourcemap
,--
sourcemaps --poll(Number)啟用并定義查看輪詢時間段(毫秒)的文件。

別名:-poll <value>

--environment(String)定義構(gòu)建環(huán)境。

別名:-e <value>,--environment <

--app(String)指定要使用的應(yīng)用程序名稱。

別名:-a <value>,-app <value>

ng版本<options ...>

輸出Angular CLI版本。

別名:v,--version,-v

--verbose(Boolean)(默認(rèn)值:false)向輸出日志記錄添加更多詳細(xì)信息。

別名:--verbose

ng xi18n <options ...>

從源代碼中提取i18n消息。

--i18n-format(String)(默認(rèn)值:xlf)生成文件的輸出格式。

別名:-f <value>,-xmb(--i18n-format = xmb),-xlf(--i18n-format = xlf),--xliff(--i18n-format = xlf),--i18nFormat <value >

--output-path(Path)(默認(rèn)值:null)放置輸出的路徑。

別名:-op <value>,--outputPath <value>

--verbose(Boolean)(默認(rèn)值:false)向輸出日志記錄添加更多詳細(xì)信息。

別名:--

verbose --progress(Boolean)(默認(rèn)值:true)運行時將進(jìn)度記錄到控制臺。

別名:--progress

--app(String)指定要使用的應(yīng)用程序名稱。

別名:-a <value>,-app <value>

--locale(String)指定應(yīng)用程序的源語言。

別名:-l <value>,--locale <value>

--out-file(String)要輸出的文件的名稱。

別名:-of <value>,--outFile <value>

英文原文

ng help
ng build <options...>
Builds your app and places it into the output path (dist/ by default).
aliases: b
--target (String) (Default: development) Defines the build target.
aliases: -t <value>, -dev (--target=development), -prod (--target=production), --target <value>
--environment (String) Defines the build environment.
aliases: -e <value>, --environment <value>
--output-path (Path) Path where output will be placed.
aliases: -op <value>, --outputPath <value>
--aot (Boolean) Build using Ahead of Time compilation.
aliases: -aot
--sourcemaps (Boolean) Output sourcemaps.
aliases: -sm, --sourcemap, --sourcemaps
--vendor-chunk (Boolean) Use a separate bundle containing only vendor libraries.
aliases: -vc, --vendorChunk
--common-chunk (Boolean) (Default: true) Use a separate bundle containing code used across multiple bundles.
aliases: -cc, --commonChunk
--base-href (String) Base url for the application being built.
aliases: -bh <value>, --baseHref <value>
--deploy-url (String) URL where files will be deployed.
aliases: -d <value>, --deployUrl <value>
--verbose (Boolean) (Default: false) Adds more details to output logging.
aliases: -v, --verbose
--progress (Boolean) (Default: true) Log progress to the console while building.
aliases: -pr, --progress
--i18n-file (String) Localization file to use for i18n.
aliases: --i18nFile <value>
--i18n-format (String) Format of the localization file specified with --i18n-file.
aliases: --i18nFormat <value>
--locale (String) Locale to use for i18n.
aliases: --locale <value>
--extract-css (Boolean) Extract css from global styles onto css files instead of js ones.
aliases: -ec, --extractCss
--watch (Boolean) (Default: false) Run build when files change.
aliases: -w, --watch
--output-hashing=none|all|media|bundles (String) Define the output filename cache-busting hashing mode.
aliases: -oh <value>, --outputHashing <value>
--poll (Number) Enable and define the file watching poll time period (milliseconds).
aliases: -poll <value>
--app (String) Specifies app name or index to use.
aliases: -a <value>, -app <value>
--delete-output-path (Boolean) (Default: true) Delete output path before build.
aliases: -dop, --deleteOutputPath
--preserve-symlinks (Boolean) (Default: false) Do not use the real path when resolving modules.
aliases: --preserveSymlinks
--extract-licenses (Boolean) (Default: true) Extract all licenses in a separate file, in the case of production builds only.
aliases: --extractLicenses
--show-circular-dependencies (Boolean) (Default: true) Show circular dependency warnings on builds.
aliases: -scd, --showCircularDependencies
--build-optimizer (Boolean) (Default: false) (Experimental) Enables @angular-devkit/build-optimizer optimizations when using --aot.
aliases: --buildOptimizer
--named-chunks (Boolean) Use file name for lazy loaded chunks.
aliases: -nc, --namedChunks
--stats-json (Boolean) (Default: false) Generates a stats.json file which can be analyzed using tools such as: webpack-bundle-analyzer or https://webpack.github.io/analyse.
aliases: --statsJson

ng completion <options...>
Adds autocomplete functionality to ng commands and subcommands.
--all (Boolean) (Default: true) Generate a completion script compatible with both bash and zsh.
aliases: -a, -all
--bash (Boolean) (Default: false) Generate a completion script for bash.
aliases: -b, -bash
--zsh (Boolean) (Default: false) Generate a completion script for zsh.
aliases: -z, -zsh

ng doc <keyword> <options...>
Opens the official Angular API documentation for a given keyword.
--search (Boolean) (Default: false) Search whole angular.io instead of just api.
aliases: -s, --search

ng e2e <options...>
Run e2e tests in existing project.
aliases: e
--target (String) (Default: development) Defines the build target.
aliases: -t <value>, -dev (--target=development), -prod (--target=production), --target <value>
--environment (String) Defines the build environment.
aliases: -e <value>, --environment <value>
--output-path (Path) Path where output will be placed.
aliases: -op <value>, --outputPath <value>
--aot (Boolean) Build using Ahead of Time compilation.
aliases: -aot
--sourcemaps (Boolean) Output sourcemaps.
aliases: -sm, --sourcemap, --sourcemaps
--vendor-chunk (Boolean) Use a separate bundle containing only vendor libraries.
aliases: -vc, --vendorChunk
--common-chunk (Boolean) (Default: true) Use a separate bundle containing code used across multiple bundles.
aliases: -cc, --commonChunk
--base-href (String) Base url for the application being built.
aliases: -bh <value>, --baseHref <value>
--deploy-url (String) URL where files will be deployed.
aliases: -d <value>, --deployUrl <value>
--verbose (Boolean) (Default: false) Adds more details to output logging.
aliases: -v, --verbose
--progress (Boolean) (Default: true) Log progress to the console while building.
aliases: -pr, --progress
--i18n-file (String) Localization file to use for i18n.
aliases: --i18nFile <value>
--i18n-format (String) Format of the localization file specified with --i18n-file.
aliases: --i18nFormat <value>
--locale (String) Locale to use for i18n.
aliases: --locale <value>
--extract-css (Boolean) Extract css from global styles onto css files instead of js ones.
aliases: -ec, --extractCss
--watch (Boolean) (Default: false) Run build when files change.
aliases: -w, --watch
--output-hashing=none|all|media|bundles (String) Define the output filename cache-busting hashing mode.
aliases: -oh <value>, --outputHashing <value>
--poll (Number) Enable and define the file watching poll time period (milliseconds).
aliases: -poll <value>
--app (String) Specifies app name or index to use.
aliases: -a <value>, -app <value>
--delete-output-path (Boolean) (Default: true) Delete output path before build.
aliases: -dop, --deleteOutputPath
--preserve-symlinks (Boolean) (Default: false) Do not use the real path when resolving modules.
aliases: --preserveSymlinks
--extract-licenses (Boolean) (Default: true) Extract all licenses in a separate file, in the case of production builds only.
aliases: --extractLicenses
--show-circular-dependencies (Boolean) (Default: true) Show circular dependency warnings on builds.
aliases: -scd, --showCircularDependencies
--build-optimizer (Boolean) (Default: false) (Experimental) Enables @angular-devkit/build-optimizer optimizations when using --aot.
aliases: --buildOptimizer
--named-chunks (Boolean) Use file name for lazy loaded chunks.
aliases: -nc, --namedChunks
--port (Number) (Default: 0) The port to use to serve the application.
aliases: -p <value>, -port <value>
--host (String) (Default: localhost) Listens only on localhost by default.
aliases: -H <value>, -host <value>
--proxy-config (Path) Proxy configuration file.
aliases: -pc <value>, --proxyConfig <value>
--ssl (Boolean) (Default: false) Serve using HTTPS.
aliases: -ssl
--ssl-key (String) (Default: ssl/server.key) SSL key to use for serving HTTPS.
aliases: --sslKey <value>
--ssl-cert (String) (Default: ssl/server.crt) SSL certificate to use for serving HTTPS.
aliases: --sslCert <value>
--open (Boolean) (Default: false) Opens the url in default browser.
aliases: -o, -open
--live-reload (Boolean) (Default: true) Whether to reload the page on change, using live-reload.
aliases: -lr, --liveReload
--public-host (String) Specify the URL that the browser client will use.
aliases: --live-reload-client <value>, --publicHost <value>
--disable-host-check (Boolean) (Default: false) Don't verify connected clients are part of allowed hosts.
aliases: --disableHostCheck
--hmr (Boolean) (Default: false) Enable hot module replacement.
aliases: -hmr
--config (String) Use a specific config file. Defaults to the protractor config file in angular-cli.json.
aliases: -c <value>, --config <value>
--specs (Array) (Default: ) Override specs in the protractor config. Can send in multiple specs by repeating flag (ng e2e --specs=spec1.ts --specs=spec2.ts).
aliases: -sp <value>, --specs <value>
--element-explorer (Boolean) (Default: false) Start Protractor's Element Explorer for debugging.
aliases: -ee, --elementExplorer
--webdriver-update (Boolean) (Default: true) Try to update webdriver.
aliases: -wu, --webdriverUpdate
--serve (Boolean) (Default: true) Compile and Serve the app. All non-reload related serve options are also available (e.g. --port=4400).
aliases: -s, --serve

ng eject <options...>
Ejects your app and output the proper webpack configuration and scripts.
--target (String) (Default: development) Defines the build target.
aliases: -t <value>, -dev (--target=development), -prod (--target=production), --target <value>
--environment (String) Defines the build environment.
aliases: -e <value>, --environment <value>
--output-path (Path) Path where output will be placed.
aliases: -op <value>, --outputPath <value>
--aot (Boolean) Build using Ahead of Time compilation.
aliases: -aot
--sourcemaps (Boolean) Output sourcemaps.
aliases: -sm, --sourcemap, --sourcemaps
--vendor-chunk (Boolean) Use a separate bundle containing only vendor libraries.
aliases: -vc, --vendorChunk
--common-chunk (Boolean) (Default: true) Use a separate bundle containing code used across multiple bundles.
aliases: -cc, --commonChunk
--base-href (String) Base url for the application being built.
aliases: -bh <value>, --baseHref <value>
--deploy-url (String) URL where files will be deployed.
aliases: -d <value>, --deployUrl <value>
--verbose (Boolean) (Default: false) Adds more details to output logging.
aliases: -v, --verbose
--progress (Boolean) (Default: true) Log progress to the console while building.
aliases: -pr, --progress
--i18n-file (String) Localization file to use for i18n.
aliases: --i18nFile <value>
--i18n-format (String) Format of the localization file specified with --i18n-file.
aliases: --i18nFormat <value>
--locale (String) Locale to use for i18n.
aliases: --locale <value>
--extract-css (Boolean) Extract css from global styles onto css files instead of js ones.
aliases: -ec, --extractCss
--watch (Boolean) (Default: false) Run build when files change.
aliases: -w, --watch
--output-hashing=none|all|media|bundles (String) Define the output filename cache-busting hashing mode.
aliases: -oh <value>, --outputHashing <value>
--poll (Number) Enable and define the file watching poll time period (milliseconds).
aliases: -poll <value>
--delete-output-path (Boolean) (Default: true) Delete output path before build.
aliases: -dop, --deleteOutputPath
--preserve-symlinks (Boolean) (Default: false) Do not use the real path when resolving modules.
aliases: --preserveSymlinks
--extract-licenses (Boolean) (Default: true) Extract all licenses in a separate file, in the case of production builds only.
aliases: --extractLicenses
--show-circular-dependencies (Boolean) (Default: true) Show circular dependency warnings on builds.
aliases: -scd, --showCircularDependencies
--build-optimizer (Boolean) (Default: false) (Experimental) Enables @angular-devkit/build-optimizer optimizations when using --aot.
aliases: --buildOptimizer
--named-chunks (Boolean) Use file name for lazy loaded chunks.
aliases: -nc, --namedChunks
--force (Boolean) Overwrite any webpack.config.js and npm scripts already existing.
aliases: --force
--app (String) Specifies app name to use.
aliases: -a <value>, -app <value>

ng generate <blueprint> <options...>
Generates and/or modifies files based on a blueprint.
aliases: g
--dry-run (Boolean) (Default: false) Run through without making any changes.
aliases: -d, --dryRun
--lint-fix (Boolean) Use lint to fix files after generation.
aliases: -lf, --lintFix
--verbose (Boolean) (Default: false) Adds more details to output logging.
aliases: -v, --verbose

ng get <options...>
Get a value from the configuration. Example: ng get [key]
--global (Boolean) (Default: false) Get the value in the global configuration (in your home directory).
aliases: --global

ng help <command-name (Default: all)>
Shows help for the CLI.

ng lint <options...>
Lints code in existing project.
aliases: l
--fix (Boolean) (Default: false) Fixes linting errors (may overwrite linted files).
aliases: -fix
--type-check (Boolean) (Default: false) Controls the type check for linting.
aliases: --typeCheck
--force (Boolean) (Default: false) Succeeds even if there was linting errors.
aliases: --force
--format (String) (Default: prose) Output format (prose, json, stylish, verbose, pmd, msbuild, checkstyle, vso, fileslist).
aliases: -t <value>, --format <value>

ng new <options...>
Creates a new directory and a new Angular app eg. "ng new [name]".
aliases: n
--dry-run (Boolean) (Default: false) Run through without making any changes. Will list all files that would have been created when running "ng new".
aliases: -d, --dryRun
--verbose (Boolean) (Default: false) Adds more details to output logging.
aliases: -v, --verbose
--skip-install (Boolean) (Default: false) Skip installing packages.
aliases: -si, --skipInstall
--skip-git (Boolean) (Default: false) Skip initializing a git repository.
aliases: -sg, --skipGit
--skip-tests (Boolean) (Default: false) Skip creating spec files.
aliases: -st, --skipTests
--skip-commit (Boolean) (Default: false) Skip committing the first commit to git.
aliases: -sc, --skipCommit
--directory (String) The directory name to create the app in.
aliases: -dir <value>, --directory <value>
--source-dir (String) (Default: src) The name of the source directory. You can later change the value in ".angular-cli.json" (apps[0].root).
aliases: -sd <value>, --sourceDir <value>
--style (String) (Default: css) The style file default extension. Possible values: css, scss, less, sass, styl(stylus). You can later change the value in ".angular-cli.json" (defaults.styleExt).
aliases: --style <value>
--prefix (String) (Default: app) The prefix to use for all component selectors. You can later change the value in ".angular-cli.json" (apps[0].prefix).
aliases: -p <value>, --prefix <value>
--routing (Boolean) (Default: false) Generate a routing module.
aliases: --routing
--inline-style (Boolean) (Default: false) Should have an inline style.
aliases: -is, --inlineStyle
--inline-template (Boolean) (Default: false) Should have an inline template.
aliases: -it, --inlineTemplate
--minimal (Boolean) (Default: false) Should create a minimal app.
aliases: --minimal

ng serve <options...>
Builds and serves your app, rebuilding on file changes.
aliases: server, s
--target (String) (Default: development) Defines the build target.
aliases: -t <value>, -dev (--target=development), -prod (--target=production), --target <value>
--environment (String) Defines the build environment.
aliases: -e <value>, --environment <value>
--output-path (Path) Path where output will be placed.
aliases: -op <value>, --outputPath <value>
--aot (Boolean) Build using Ahead of Time compilation.
aliases: -aot
--sourcemaps (Boolean) Output sourcemaps.
aliases: -sm, --sourcemap, --sourcemaps
--vendor-chunk (Boolean) Use a separate bundle containing only vendor libraries.
aliases: -vc, --vendorChunk
--common-chunk (Boolean) (Default: true) Use a separate bundle containing code used across multiple bundles.
aliases: -cc, --commonChunk
--base-href (String) Base url for the application being built.
aliases: -bh <value>, --baseHref <value>
--deploy-url (String) URL where files will be deployed.
aliases: -d <value>, --deployUrl <value>
--verbose (Boolean) (Default: false) Adds more details to output logging.
aliases: -v, --verbose
--progress (Boolean) (Default: true) Log progress to the console while building.
aliases: -pr, --progress
--i18n-file (String) Localization file to use for i18n.
aliases: --i18nFile <value>
--i18n-format (String) Format of the localization file specified with --i18n-file.
aliases: --i18nFormat <value>
--locale (String) Locale to use for i18n.
aliases: --locale <value>
--extract-css (Boolean) Extract css from global styles onto css files instead of js ones.
aliases: -ec, --extractCss
--watch (Boolean) (Default: true) Rebuild on change.
aliases: -w, --watch
--output-hashing=none|all|media|bundles (String) Define the output filename cache-busting hashing mode.
aliases: -oh <value>, --outputHashing <value>
--poll (Number) Enable and define the file watching poll time period (milliseconds).
aliases: -poll <value>
--app (String) Specifies app name or index to use.
aliases: -a <value>, -app <value>
--delete-output-path (Boolean) (Default: true) Delete output path before build.
aliases: -dop, --deleteOutputPath
--preserve-symlinks (Boolean) (Default: false) Do not use the real path when resolving modules.
aliases: --preserveSymlinks
--extract-licenses (Boolean) (Default: true) Extract all licenses in a separate file, in the case of production builds only.
aliases: --extractLicenses
--show-circular-dependencies (Boolean) (Default: true) Show circular dependency warnings on builds.
aliases: -scd, --showCircularDependencies
--build-optimizer (Boolean) (Default: false) (Experimental) Enables @angular-devkit/build-optimizer optimizations when using --aot.
aliases: --buildOptimizer
--named-chunks (Boolean) Use file name for lazy loaded chunks.
aliases: -nc, --namedChunks
--port (Number) (Default: 4200) Port to listen to for serving.
aliases: -p <value>, -port <value>
--host (String) (Default: localhost) Listens only on localhost by default.
aliases: -H <value>, -host <value>
--proxy-config (Path) Proxy configuration file.
aliases: -pc <value>, --proxyConfig <value>
--ssl (Boolean) (Default: false) Serve using HTTPS.
aliases: -ssl
--ssl-key (String) (Default: ssl/server.key) SSL key to use for serving HTTPS.
aliases: --sslKey <value>
--ssl-cert (String) (Default: ssl/server.crt) SSL certificate to use for serving HTTPS.
aliases: --sslCert <value>
--open (Boolean) (Default: false) Opens the url in default browser.
aliases: -o, -open
--live-reload (Boolean) (Default: true) Whether to reload the page on change, using live-reload.
aliases: -lr, --liveReload
--public-host (String) Specify the URL that the browser client will use.
aliases: --live-reload-client <value>, --publicHost <value>
--disable-host-check (Boolean) (Default: false) Don't verify connected clients are part of allowed hosts.
aliases: --disableHostCheck
--hmr (Boolean) (Default: false) Enable hot module replacement.
aliases: -hmr

ng set <options...>
Set a value in the configuration.
--global (Boolean) (Default: false) Set the value in the global configuration rather than in your project's.
aliases: -g, --global

ng test <options...>
Run unit tests in existing project.
aliases: t
--watch (Boolean) Run build when files change.
aliases: -w, --watch
--code-coverage (Boolean) (Default: false) Coverage report will be in the coverage/ directory.
aliases: -cc, --codeCoverage
--config (String) Use a specific config file. Defaults to the karma config file in .angular-cli.json.
aliases: -c <value>, --config <value>
--single-run (Boolean) Run tests a single time.
aliases: -sr, --singleRun
--progress (Boolean) (Default: true) Log progress to the console while in progress.
aliases: --progress
--browsers (String) Override which browsers tests are run against.
aliases: --browsers <value>
--colors (Boolean) Enable or disable colors in the output (reporters and logs).
aliases: --colors
--log-level (String) Level of logging.
aliases: --logLevel <value>
--port (Number) Port where the web server will be listening.
aliases: -port <value>
--reporters (String) List of reporters to use.
aliases: --reporters <value>
--sourcemaps (Boolean) (Default: true) Output sourcemaps.
aliases: -sm, --sourcemap, --sourcemaps
--poll (Number) Enable and define the file watching poll time period (milliseconds).
aliases: -poll <value>
--environment (String) Defines the build environment.
aliases: -e <value>, --environment <value>
--app (String) Specifies app name to use.
aliases: -a <value>, -app <value>

ng version <options...>
Outputs Angular CLI version.
aliases: v, --version, -v
--verbose (Boolean) (Default: false) Adds more details to output logging.
aliases: --verbose

ng xi18n <options...>
Extracts i18n messages from source code.
--i18n-format (String) (Default: xlf) Output format for the generated file.
aliases: -f <value>, -xmb (--i18n-format=xmb), -xlf (--i18n-format=xlf), --xliff (--i18n-format=xlf), --i18nFormat <value>
--output-path (Path) (Default: null) Path where output will be placed.
aliases: -op <value>, --outputPath <value>
--verbose (Boolean) (Default: false) Adds more details to output logging.
aliases: --verbose
--progress (Boolean) (Default: true) Log progress to the console while running.
aliases: --progress
--app (String) Specifies app name to use.
aliases: -a <value>, -app <value>
--locale (String) Specifies the source language of the application.
aliases: -l <value>, --locale <value>
--out-file (String) Name of the file to output.
aliases: -of <value>, --outFile <value>

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌,老刑警劉巖,帶你破解...
    沈念sama閱讀 227,401評論 6 531
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異,居然都是意外死亡,警方通過查閱死者的電腦和手機(jī),發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 98,011評論 3 413
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人,你說我怎么就攤上這事。” “怎么了?”我有些...
    開封第一講書人閱讀 175,263評論 0 373
  • 文/不壞的土叔 我叫張陵,是天一觀的道長。 經(jīng)常有香客問我,道長,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 62,543評論 1 307
  • 正文 為了忘掉前任,我火速辦了婚禮,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘。我一直安慰自己,他們只是感情好,可當(dāng)我...
    茶點故事閱讀 71,323評論 6 404
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著,像睡著了一般。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 54,874評論 1 321
  • 那天,我揣著相機(jī)與錄音,去河邊找鬼。 笑死,一個胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播,決...
    沈念sama閱讀 42,968評論 3 439
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 42,095評論 0 286
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 48,605評論 1 331
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 40,551評論 3 354
  • 正文 我和宋清朗相戀三年,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 42,720評論 1 369
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情,我是刑警寧澤,帶...
    沈念sama閱讀 38,242評論 5 355
  • 正文 年R本政府宣布,位于F島的核電站,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點故事閱讀 43,961評論 3 345
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧,春花似錦、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 34,358評論 0 25
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 35,612評論 1 280
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機(jī)就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人。 一個月前我還...
    沈念sama閱讀 51,330評論 3 390
  • 正文 我出身青樓,卻偏偏與公主長得像,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 47,690評論 2 370

推薦閱讀更多精彩內(nèi)容