Giora Guttsait e87598e5db docs(@angular/cli): update documentation for ng new
* for several options that are saved in .angular-cli.json, I've added an explanation of what setting in the json file controls that options.
* added an explanation about what --dry-run will output.
* added possible values for --style option
* added respective documentation in the command
* also added less, sass and styl(stylus) as possible style extensions

The motivation for this change is that sometimes people would want to change some of the settings set by the cli durig ng new, that they might have not known or cared about, for example, prefix.
2017-06-12 09:52:45 -04:00

3.6 KiB

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

directory

--directory (alias: -dir) default value: dir

The directory name to create the app in.

dry-run

--dry-run (alias: -d) default value: false

Run through without making any changes. Will list all files that would have been created when running ng new.

inline-style

--inline-style (alias: -is) default value: false

Should have an inline style.

inline-template

--inline-template (alias: -it) default value: false

Should have an inline template.

minimal

--minimal default value: false

Should create a minimal app.

prefix

--prefix (alias: -p) default value: app

The prefix to use for all component selectors.

You can later change the value in .angular-cli.json (apps[0].prefix).

routing

--routing default value: false

Generate a routing module.

skip-commit

--skip-commit (alias: -sc) default value: false

Skip committing the first commit to git.

skip-git

--skip-git (alias: -sg) default value: false

Skip initializing a git repository.

skip-install

--skip-install (alias: -si) default value: false

Skip installing packages.

skip-tests

--skip-tests (aliases: -st) default value: false

Skip creating spec files.

Skip including e2e functionality.

source-dir

--source-dir (alias: -sd) default value: src

The name of the source directory.

You can later change the value in .angular-cli.json (apps[0].root).

style

--style default value: 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).

verbose

--verbose (alias: -v) default value: false

Adds more details to output logging.