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
Syntax. ng new command creates a workspace of given name with a default Angular Application. It provides interactive prompts to set optional configurations. All prompts have default values to choose.
Use Angular CLI command ng serve -o to build an application. The -o indicates to open it automatically in the default browser. Use NPM command npm start to build an application.
CLI Component Generation It looks like the CLI automatically created the new folder to hold our new component in app/virtual-machines . In addition we see four new files associated with the automatically generated component.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With