0

I have a workspace including two angular libraries with ng add schematics and a schematics project with a custom ng new schematic.

I'd like to call the ng add schematics of the libraries from my ng new schematic, so I don't have to maintain their setup in two places.

Unfortunately this seems impossible because the externalSchematics function requires the collection to be available which makes calling ng add kind of pointless.

Is there another way to accomplish this?

pfeileon
  • 290
  • 1
  • 17

1 Answers1

0

Adding the library with the ng add schematic as a dependency of the schematics project should actually let you call externalSchematics('library', 'ng-add', options) from the custom ng new.

Unfortunately there is a regression bug and this doesn't work since the change to Angular 9: https://github.com/angular/angular-cli/issues/18098.

pfeileon
  • 290
  • 1
  • 17