-
Notifications
You must be signed in to change notification settings - Fork 155
feat(@angular-devkit/schematics): support collection extension #398
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 little nits. Nothing major. Good work!
@@ -4,6 +4,11 @@ | |||
"title": "Collection Schema for validating a 'collection.json'.", | |||
"type": "object", | |||
"properties": { | |||
"extends": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How hard to add type: [ "array", "string" ]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added support for both.
@@ -38,6 +38,66 @@ describe('FileSystemEngineHost', () => { | |||
expect(schematic1.description.name).toBe('schematic1'); | |||
}); | |||
|
|||
it('extends a collection ', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should just add a test for listSchematicNames
to avoid regression.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
|
||
private _createCollectionDescription( | ||
name: string, | ||
parentNames?: Set<string>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one nit but not stopping the approval; parentNames = new Set<string>()
then lower just add regardless of whether it's defined or not.
Example usage (also supports an array of strings):
Closes #34