Reputation: 1
The Angular CLI has an option called --minimal
. What does it do and where is it documented? The command ng help new
says very little about it
--minimal (Boolean) (Default: false) Should create a minimal app.
aliases: --minimal
Upvotes: 28
Views: 16164
Reputation: 3044
Currently as of 2018 Dec and with Angular cli 7.0.7, minimal option has been added back. It means Create a barebones project without any testing frameworks
.
You can check angular cli version 7 document for the list of options.
Below is the list of options return by ng new --help command.
ng new --help
arguments:
name
The name of the workspace.
options:
--collection (-c)
Schematics collection to use.
--commit
Initial repository commit information.
--create-application
Flag to toggle creation of an application in the new workspace.
--defaults
When true, disables interactive input prompts for options with a default.
--directory
The directory name to create the workspace in.
--dry-run (-d)
When true, run through and report activity without writing out results.
--experimental-ivy
EXPERIMENTAL: Specifies whether to create a new application which uses the Ivy rendering engine.
--force (-f)
When true, force overwriting of existing files.
--help
Shows a help message for this command in the console.
--inline-style (-s)
Specifies if the style will be in the ts file.
--inline-template (-t)
Specifies if the template will be in the ts file.
--interactive
When false, disables interactive input prompts.
--minimal
Create a barebones project without any testing frameworks
--new-project-root
The path where new projects will be created.
--prefix (-p)
The prefix to apply to generated selectors.
--routing
Generates a routing module.
--skip-git (-g)
Skip initializing a git repository.
--skip-install
Skip installing dependency packages.
--skip-tests (-S)
Skip creating spec files.
--style
The file extension to be used for style files.
--verbose (-v)
Adds more details to output logging.
--view-encapsulation
Specifies the view encapsulation strategy.
As of Angular cli 6.0.8, minimal option seems to have been removed. You may have to run --skip-tests, --inline-style and --inline-template like the other answer suggests to get the minimal project.
According to angular cli wiki page, these are the options available
dry-run
force
verbose
collection
inline-style
inline-template
view-encapsulation
routing
prefix
style
skip-tests
skip-package-json
If you run this command: ng new --help
, you can see what options are available with Angular cli 6.0.8
usage: ng new <name> [options]
options:
--collection (-c)
Schematics collection to use.
--directory
The directory name to create the workspace in.
--dryRun (-d)
Run through without making any changes.
--force (-f)
Forces overwriting of files.
--inline-style (-s)
Specifies if the style will be in the ts file.
--inline-template (-t)
Specifies if the template will be in the ts file.
--new-project-root
The path where new projects will be created.
--prefix (-p)
The prefix to apply to generated selectors.
--routing
Generates a routing module.
--skip-git (-g)
Skip initializing a git repository.
--skip-install
Skip installing dependency packages.
--skip-tests (-S)
Skip creating spec files.
--style
The file extension to be used for style files.
--verbose (-v)
Adds more details to output logging.
--view-encapsulation
Specifies the view encapsulation strategy.
Upvotes: 8
Reputation: 1
Current as of July 31, 2017 A regular angular app generates 5 directories, 26 files. A --minimal
generates 4 directories, 13 files
. The difference? --minimal
excludes generation of multiple files by enabling some other options.
--skip-tests
: stops the generation of testing (viz. e2e, karma.conf.js
, protractor.conf.js
, and *.spec.
files) including tsconfig.spec.json
, app.component.spec.ts
--inline-style
: stops the generation of external css stubs instead keeping an empty string in the .ts
file.--inline-template
: stops the generation of external html instead keeping it in the template
variable in the .ts
file.README.md
Here are the example's generated without --minimal
my-app/
├── e2e
│ ├── app.e2e-spec.ts
│ ├── app.po.ts
│ └── tsconfig.e2e.json
├── karma.conf.js
├── package.json
├── package-lock.json
├── protractor.conf.js
├── README.md
├── src
│ ├── app
│ │ ├── app.component.css
│ │ ├── app.component.html
│ │ ├── app.component.spec.ts
│ │ ├── app.component.ts
│ │ └── app.module.ts
│ ├── assets
│ ├── environments
│ │ ├── environment.prod.ts
│ │ └── environment.ts
│ ├── favicon.ico
│ ├── index.html
│ ├── main.ts
│ ├── polyfills.ts
│ ├── styles.css
│ ├── test.ts
│ ├── tsconfig.app.json
│ ├── tsconfig.spec.json
│ └── typings.d.ts
├── tsconfig.json
└── tslint.json
--minimal
does the following
├── package.json
├── package-lock.json
├── src
│ ├── app
│ │ ├── app.component.ts
│ │ └── app.module.ts
│ ├── assets
│ ├── environments
│ │ ├── environment.prod.ts
│ │ └── environment.ts
│ ├── index.html
│ ├── main.ts
│ ├── polyfills.ts
│ ├── styles.css
│ ├── tsconfig.app.json
│ └── typings.d.ts
└── tsconfig.json
Upvotes: 46