generator: registerTransformStream in composed generators is not applied
When using composeWith, the composed generators’ registered transform streams are not applied.
Is this by design?
Explanation by example:
Assume two generators
- generator-base
- generator-child
generator-base calls composeWith('child', ...
generator-child calls this.registerTransformStream
if you run yo child, the transform stream is applied
if you run yo base, the transform stream is ignored
Repo to reproduce the issue: https://github.com/olsonpm/composeWith-registerTransformStream
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 15 (10 by maintainers)
I honestly stopped using yeoman since composition turned out to be too much of a hassle. To me, composition is the answer to the insane number of yeoman generators out there which all share tons of code. (i.e. the search term ‘angular’ should not turn up 201 results, which I’m assuming is a hardcoded max on the website and not the number of angular generators)
Here is a rough draft to my proposed fix: https://github.com/olsonpm/generator/tree/composed-transforms
To test, follow the readme on this generator repo https://github.com/olsonpm/composeWith-registerTransformStream/tree/fix
I did not write any automated tests for the generator, as it’s just a proof of concept. It’s just to prove my above idea can be implemented with a relatively small amount of code.