Collection Extension / Merging #34
Description
Sometimes you want to reuse schematics from another collection as is. For example, someone could want to implement a collection that is the exact same as the angular one (same schematics), but changes only 1 schematic. All the others should be the same. Or maybe a company wants to have a default collection on their CLI but have that collection include schematics from a number of other collections.
A proper system should allow merging of collections, with some resolution if there's a collusion, and a list of schematics that it implements itself (might be empty). As an example (the schema is just an example):
{
"$schema": "http://schema.angular.io/schematics/collection/2",
"name": "my-com",
"description": "My Company default collection, containing all schematics that are used normally",
"extends": [
"@schematics/angular",
"@my-company/schematics-base",
"@my-company/schematics-pages"
],
"schematics": {
}
}
This would include the base angular schematics, the base my-company schematics and the pages schematics. This helps with separating development of each of those, while the end user can just install and use one collection. The schematics are merged, with names being overridden by pages, then base, then angular.