0

I've made a chained schematics and in the first part I generate a module using:

externalSchematic('@schematics/angular', 'module', moduleOptions).

In the second part/element of the chain I call a schematic I've written and I want to edit one of the files added during above module creation. However tree.visit() iterates on whole project tree, which is highly unnecessary.

When I log tree/host I see it has a private _record and in term that one has a _filesToCreate set containing only files created in previous step.

Is there a helper function or property/method of tree I'm missing that helps?

Update

Adding tree.getDir(path) before calling .visit(), path being specific folder of added files, makes things faster of course.

I just want to know if there is a way to read in my second step of chain, get list of files created/modified in the previous step, since they are kept in host object, I just can't find a way to read that set/list.

Bogac
  • 3,596
  • 6
  • 35
  • 58

1 Answers1

0

When I check the source code I see they are protected members and there seems no public getters or methods exists to expose them for the time being.

‍♀️

Bogac
  • 3,596
  • 6
  • 35
  • 58