Skip to content

Generating Routing Module ignores "spec"-setting in angular-cli.json #4404

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
probert94 opened this issue Feb 3, 2017 · 3 comments
Closed

Comments

@probert94
Copy link

Please provide us with the following information:

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

Windows 10

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:

@angular/cli: 1.0.0-beta.30
node: 7.3.0

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

  1. Create an app using the "--skip-tests" flag, or set all specs in the angular-cli.json to "false":
    "spec": {
      "class": false,
      "component": false,
      "directive": false,
      "module": false,
      "pipe": false,
      "service": false
    }
  1. Generate a new routing module using "ng g module test --routing"

Expected output/files generated.

installing module
  create src\app\test\test-routing.module.ts
  create src\app\test\test.module.ts
installing component
  create src\app\test\test.component.scss
  create src\app\test\test.component.html
  create src\app\test\test.component.ts
  update src\app\test\test.module.ts

Actual output/files generated.

installing module
  create src\app\test\test-routing.module.ts
  create src\app\test\test.module.ts
installing component
  create src\app\test\test.component.scss
  create src\app\test\test.component.html
  create src\app\test\test.component.spec.ts    <------- This file shouldn't be generated
  create src\app\test\test.component.ts
  update src\app\test\test.module.ts

Mention any other details that might be useful.

Note the generated "test.component.spec.ts" file.
I would expect, that no "spec.ts"-File is generated, when the spec-generation for Components is disabled inside the angular-cli.json

@probert94
Copy link
Author

It seems like the "inline-style" and "inline-template" setting is ignored to. The ".html" and ".css" will always be generated.

saverett added a commit to saverett/angular-cli that referenced this issue Feb 24, 2017
saverett added a commit to saverett/angular-cli that referenced this issue Feb 24, 2017
…son defaults

Add documentation for a breaking change in angular-cli.json (see angular#4389) that was missed in the changelog

Fix angular#4404
@filipesilva
Copy link
Contributor

We don't generate a component with a routing module anymore, so this shouldn't happen.

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants