Skip to content

Commit

Permalink
feat(angular): add sass to stylePreprocessorOptions in applicatio…
Browse files Browse the repository at this point in the history
…n executor (#28901)

Upstream change:
angular/angular-cli@b6951f4

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
  • Loading branch information
leosvelperez authored Nov 12, 2024
1 parent cb69c51 commit ce4a32b
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/generated/packages/angular/executors/application.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,28 @@
"type": "array",
"items": { "type": "string" },
"default": []
},
"sass": {
"description": "Options to pass to the sass preprocessor. _Note: this is only supported in Angular versions >= 19.0.0_.",
"type": "object",
"properties": {
"fatalDeprecations": {
"description": "A set of deprecations to treat as fatal. If a deprecation warning of any provided type is encountered during compilation, the compiler will error instead. If a Version is provided, then all deprecations that were active in that compiler version will be treated as fatal.",
"type": "array",
"items": { "type": "string" }
},
"silenceDeprecations": {
"description": " A set of active deprecations to ignore. If a deprecation warning of any provided type is encountered during compilation, the compiler will ignore it instead.",
"type": "array",
"items": { "type": "string" }
},
"futureDeprecations": {
"description": "A set of future deprecations to opt into early. Future deprecations passed here will be treated as active by the compiler, emitting warnings as necessary.",
"type": "array",
"items": { "type": "string" }
}
},
"additionalProperties": false
}
},
"additionalProperties": false
Expand Down
28 changes: 28 additions & 0 deletions packages/angular/src/executors/application/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,34 @@
"type": "string"
},
"default": []
},
"sass": {
"description": "Options to pass to the sass preprocessor. _Note: this is only supported in Angular versions >= 19.0.0_.",
"type": "object",
"properties": {
"fatalDeprecations": {
"description": "A set of deprecations to treat as fatal. If a deprecation warning of any provided type is encountered during compilation, the compiler will error instead. If a Version is provided, then all deprecations that were active in that compiler version will be treated as fatal.",
"type": "array",
"items": {
"type": "string"
}
},
"silenceDeprecations": {
"description": " A set of active deprecations to ignore. If a deprecation warning of any provided type is encountered during compilation, the compiler will ignore it instead.",
"type": "array",
"items": {
"type": "string"
}
},
"futureDeprecations": {
"description": "A set of future deprecations to opt into early. Future deprecations passed here will be treated as active by the compiler, emitting warnings as necessary.",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,11 @@ export function validateOptions(options: ApplicationExecutorOptions): void {
`The "outputMode" option requires Angular version 19.0.0 or greater. You are currently using version ${angularVersion}.`
);
}

if (options.stylePreprocessorOptions?.sass) {
throw new Error(
`The "stylePreprocessorOptions.sass" option requires Angular version 19.0.0 or greater. You are currently using version ${angularVersion}.`
);
}
}
}

0 comments on commit ce4a32b

Please sign in to comment.