Skip to content

Default schematics options with uppercase doesn't work #10371

Closed
@cyrilletuzi

Description

@cyrilletuzi

Versions

cli v6.0.0-rc.5

Repro steps

  • npm install @angular/cli@next
  • ng new helloworld --inline-template
  • cd helloworld
  • ng g generate test

Observed behavior

Produce a component with external template.

Desired behavior

Produce a component with inline template.

Mention any other details that might be useful (optional)

I did some investigation:

"schematics": {
    "@schematics/angular:component": {
      "inlineTemplate": true
    }
}
  • adding other options in lowercase like spec works:
"schematics": {
    "@schematics/angular:component": {
      "spec": false
    }
}
  • adding other options with uppercase letters like skipImport doesn't work:
"schematics": {
    "@schematics/angular:component": {
      "skipImport": true
    }
}

So I think the defaults options of angular.json with uppercase letters are wrongly transformed/passed to the generation command.

I think it's a quick PR I can do, but I don't know where the problem happen...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions