Skip to content

Commit

Permalink
refactor(schematics): migrate from styleext to style (#2254)
Browse files Browse the repository at this point in the history
Closes #2248

BREAKING CHANGES:

To be inline with the Angular CLI, the `styleExt` option has been changed to `style`.

BEFORE:

```
"@schematics/angular:component": {
      "inlineStyle": true,
      "prefix": "aio",
      "styleext": "scss"
    }
...
```

AFTER:

```
"@schematics/angular:component": {
      "inlineStyle": true,
      "prefix": "aio",
      "style": "scss"
    }
....
```
  • Loading branch information
Jefiozie authored and brandonroberts committed Jan 7, 2020
1 parent 1758d34 commit 2801018
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"flat": true,
"spec": false,
"prefix": "bc",
"styleext": "css"
"style": "css"
},
"@schematics/angular:directive": {
"prefix": "bc"
Expand Down
2 changes: 1 addition & 1 deletion modules/schematics/src/container/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('Container Schematic', () => {
inlineStyle: false,
inlineTemplate: false,
changeDetection: 'Default',
styleext: 'css',
style: 'css',
spec: true,
module: undefined,
export: false,
Expand Down
5 changes: 3 additions & 2 deletions modules/schematics/src/container/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@
"description": "The prefix to apply to generated selectors.",
"alias": "p"
},
"styleext": {
"description": "The file extension to be used for style files.",
"style": {
"description":
"The file extension or preprocessor to use for style files.",
"type": "string",
"default": "css"
},
Expand Down
4 changes: 2 additions & 2 deletions modules/schematics/src/container/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ export interface Schema {
*/
prefix?: string;
/**
* The file extension to be used for style files.
* The file extension or preprocessor to use for style files.
*/
styleext?: string;
style?: string;
/**
* Specifies if a spec file is generated.
*/
Expand Down
2 changes: 1 addition & 1 deletion projects/ngrx.io/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
"@schematics/angular:component": {
"inlineStyle": true,
"prefix": "aio",
"styleext": "scss"
"style": "scss"
},
"@schematics/angular:directive": {
"prefix": "aio"
Expand Down
2 changes: 1 addition & 1 deletion projects/ngrx.io/content/guide/schematics/container.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ If you want to generate a container with an scss file, add `@ngrx/schematics:con
```json
"schematics": {
"@ngrx/schematics:container": {
"styleext": "scss"
"style": "scss"
}
}
```
2 changes: 1 addition & 1 deletion projects/ngrx.io/content/guide/schematics/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ The `@ngrx/schematics` extend the default `@schematics/angular` collection. If y
```json
"schematics": {
"@ngrx/schematics:component": {
"styleext": "scss"
"style": "scss"
}
}
```

0 comments on commit 2801018

Please sign in to comment.