feat(schematics): ng-add schematics for adding element dependencies and styling configuration#1536
feat(schematics): ng-add schematics for adding element dependencies and styling configuration#1536mistrykaran91 wants to merge 1 commit intomainfrom
Conversation
mistrykaran91
commented
Feb 17, 2026
- I confirm that this MR follows the contribution guidelines.
There was a problem hiding this comment.
Code Review
This pull request introduces ng-add schematics for @siemens/element-ng, which is a great enhancement for user experience. The implementation is well-structured, separating dependency management and styling configuration into different files and schematics. The use of tasks to run installation before style configuration is correct. I've found one area for improvement regarding code duplication and performance in add-dependencies.ts, which I've detailed in a specific comment. Overall, this is a solid implementation.
|
Documentation. Coverage Reports: |
594d04a to
8a44a03
Compare
…nd styling configuration
8a44a03 to
7c31c90
Compare
| addDependency('@siemens/element-theme', elementVersion, options), | ||
| addDependency('@siemens/element-translate-ng', elementVersion, options), | ||
| addDependency('@angular/cdk', cdkVersion, options), | ||
| addDependency('@simpl/brand', '2.2.0', options), |
There was a problem hiding this comment.
I guess this version is already outdated. Can you please add a unit test, that checks that this version is inline with the one from root package.json
| */ | ||
| export const addElementDependencies = (): Rule => { | ||
| return (tree: Tree, context: SchematicContext) => { | ||
| const packageJsonPath = join(dirname(fileURLToPath(import.meta.url)), '../../package.json'); |
There was a problem hiding this comment.
what about just having a normal import statement for our package.json?