Angular-cli: ng new <project-name> --minimal flag is not working in Angular CLI: 6.0.0

Created on 24 May 2018  路  6Comments  路  Source: angular/angular-cli

Versions

Angular CLI: 6.0.0
Node: 8.11.1
OS: win32 x64

Repro steps

Run below command
ng new my-app --minimal -d

Observed behavior

E:\repo>ng new my-app --minimal -d
CREATE my-app/angular.json (3400 bytes)
CREATE my-app/package.json (1310 bytes)
CREATE my-app/README.md (1022 bytes)
CREATE my-app/tsconfig.json (384 bytes)
CREATE my-app/tslint.json (2805 bytes)
CREATE my-app/.editorconfig (245 bytes)
CREATE my-app/.gitignore (503 bytes)
CREATE my-app/src/environments/environment.prod.ts (51 bytes)
CREATE my-app/src/environments/environment.ts (631 bytes)
CREATE my-app/src/favicon.ico (5430 bytes)
CREATE my-app/src/index.html (292 bytes)
CREATE my-app/src/main.ts (370 bytes)
CREATE my-app/src/polyfills.ts (3194 bytes)
CREATE my-app/src/test.ts (642 bytes)
CREATE my-app/src/assets/.gitkeep (0 bytes)
CREATE my-app/src/styles.css (80 bytes)
CREATE my-app/src/browserslist (375 bytes)
CREATE my-app/src/karma.conf.js (964 bytes)
CREATE my-app/src/tsconfig.app.json (194 bytes)
CREATE my-app/src/tsconfig.spec.json (282 bytes)
CREATE my-app/src/tslint.json (314 bytes)
CREATE my-app/src/app/app.module.ts (314 bytes)
CREATE my-app/src/app/app.component.html (1141 bytes)
CREATE my-app/src/app/app.component.spec.ts (986 bytes)
CREATE my-app/src/app/app.component.ts (207 bytes)
CREATE my-app/src/app/app.component.css (0 bytes)
CREATE my-app/e2e/protractor.conf.js (752 bytes)
CREATE my-app/e2e/src/app.e2e-spec.ts (299 bytes)
CREATE my-app/e2e/src/app.po.ts (208 bytes)
CREATE my-app/e2e/tsconfig.e2e.json (213 bytes)

NOTE: Run with "dry run" no changes were made.

Desired behavior

--mimal flag was working in earlier version of angular cli.

Expected output :

E:\repo>ng new my-app --minimal -d
CREATE my-app/angular.json (3400 bytes)
CREATE my-app/package.json (1310 bytes)
CREATE my-app/README.md (1022 bytes)
CREATE my-app/tsconfig.json (384 bytes)
CREATE my-app/tslint.json (2805 bytes)
CREATE my-app/.editorconfig (245 bytes)
CREATE my-app/.gitignore (503 bytes)
CREATE my-app/src/environments/environment.prod.ts (51 bytes)
CREATE my-app/src/environments/environment.ts (631 bytes)
CREATE my-app/src/favicon.ico (5430 bytes)
CREATE my-app/src/index.html (292 bytes)
CREATE my-app/src/main.ts (370 bytes)
CREATE my-app/src/polyfills.ts (3194 bytes)
CREATE my-app/src/assets/.gitkeep (0 bytes)
CREATE my-app/src/styles.css (80 bytes)
CREATE my-app/src/browserslist (375 bytes)
CREATE my-app/src/tsconfig.app.json (194 bytes)
CREATE my-app/src/tslint.json (314 bytes)
CREATE my-app/src/app/app.module.ts (314 bytes)
CREATE my-app/src/app/app.component.ts (207 bytes)
CREATE my-app/src/app/app.component.css (0 bytes)

Mention any other details that might be useful (optional)

Most helpful comment

I agree it is a bit of a PITA that is was removed in version 6 and up. @Brocco , can you tell us a little bit on why this was done?

As an addition to what @jeroenheijmans wrote, you can also use shortcuts or camelCase notation:

-s or --inlineStyle
-t or --inlineTemplate
-S or --skipTests

so the complete command should now read something like ng new <project-name> -s -t -S

All 6 comments

I recently noticed this as well. The minimal option is simply not there in version 6.

Not document, not listed in ng new --help.

yeah @LayZeeDK . It got removed in version 6.

This is correct, that feature is not present in version 6.

I am going to close this issue, but if this is a feature that you would like to see re-added, please open a new issue (you can link to this issue.)

Thanks!

This thread is a top hit when Googling. I had already realized that this was since version 6, but wanted to know how to emulate it. With some more Googling, specifically this question , I found that with Angular 6 you should do...

ng new MyAppName \
  --inline-style \
  --inline-template \
  --skip-tests

...to get a similar result.

Optionally add --skip-git too, not sure if that was part of --minimal or not.

Leaving this comment here for other Googlers landing here.

I agree it is a bit of a PITA that is was removed in version 6 and up. @Brocco , can you tell us a little bit on why this was done?

As an addition to what @jeroenheijmans wrote, you can also use shortcuts or camelCase notation:

-s or --inlineStyle
-t or --inlineTemplate
-S or --skipTests

so the complete command should now read something like ng new <project-name> -s -t -S

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hartjo picture hartjo  路  3Comments

purushottamjha picture purushottamjha  路  3Comments

jmurphzyo picture jmurphzyo  路  3Comments

rajjejosefsson picture rajjejosefsson  路  3Comments

daBishMan picture daBishMan  路  3Comments