mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-16 18:43:42 +08:00
121 lines
2.4 KiB
Markdown
121 lines
2.4 KiB
Markdown
<!-- Links in /docs/documentation should NOT have `.md` at the end, because they end up in our wiki at release. -->
|
|
|
|
**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/new)**.
|
|
|
|
# ng new
|
|
|
|
## Overview
|
|
`ng new [name]` creates a new angular application.
|
|
|
|
Default applications are created in a directory of the same name, with an initialized Angular application.
|
|
|
|
## Options
|
|
<details>
|
|
<summary>dry-run</summary>
|
|
<p>
|
|
<code>--dry-run</code> (alias: <code>-d</code>)
|
|
</p>
|
|
<p>
|
|
Run through without making any changes.
|
|
</p>
|
|
</details>
|
|
<details>
|
|
<summary>force</summary>
|
|
<p>
|
|
<code>--force</code> (alias: <code>-f</code>)
|
|
</p>
|
|
<p>
|
|
Forces overwriting of files.
|
|
</p>
|
|
</details>
|
|
<details>
|
|
<summary>verbose</summary>
|
|
<p>
|
|
<code>--verbose</code> (alias: <code>-v</code>)
|
|
</p>
|
|
<p>
|
|
Adds more details to output logging.
|
|
</p>
|
|
</details>
|
|
<details>
|
|
<summary>collection</summary>
|
|
<p>
|
|
<code>--collection</code> (alias: <code>-c</code>)
|
|
</p>
|
|
<p>
|
|
Schematics collection to use.
|
|
</p>
|
|
</details>
|
|
<details>
|
|
<summary>inline-style</summary>
|
|
<p>
|
|
<code>--inline-style</code> (alias: <code>-s</code>)
|
|
</p>
|
|
<p>
|
|
Specifies if the style will be in the ts file.
|
|
</p>
|
|
</details>
|
|
<details>
|
|
<summary>inline-template</summary>
|
|
<p>
|
|
<code>--inline-template</code> (alias: <code>-t</code>)
|
|
</p>
|
|
<p>
|
|
Specifies if the template will be in the ts file.
|
|
</p>
|
|
</details>
|
|
<details>
|
|
<summary>view-encapsulation</summary>
|
|
<p>
|
|
<code>--view-encapsulation</code>
|
|
</p>
|
|
<p>
|
|
Specifies the view encapsulation strategy.
|
|
</p>
|
|
</details>
|
|
<details>
|
|
<summary>routing</summary>
|
|
<p>
|
|
<code>--routing</code>
|
|
</p>
|
|
<p>
|
|
Generates a routing module.
|
|
</p>
|
|
</details>
|
|
<details>
|
|
<summary>prefix</summary>
|
|
<p>
|
|
<code>--prefix</code> (alias: <code>-p</code>)
|
|
</p>
|
|
<p>
|
|
The prefix to apply to generated selectors.
|
|
</p>
|
|
</details>
|
|
<details>
|
|
<summary>style</summary>
|
|
<p>
|
|
<code>--style</code>
|
|
</p>
|
|
<p>
|
|
The file extension to be used for style files.
|
|
</p>
|
|
</details>
|
|
<details>
|
|
<summary>skip-tests</summary>
|
|
<p>
|
|
<code>--skip-tests</code> (alias: <code>-S</code>)
|
|
</p>
|
|
<p>
|
|
Skip creating spec files.
|
|
</p>
|
|
</details>
|
|
<details>
|
|
<summary>skip-package-json</summary>
|
|
<p>
|
|
<code>--skip-package-json</code>
|
|
</p>
|
|
<p>
|
|
Do not add dependencies to package.json.
|
|
</p>
|
|
</details>
|