Closed ngawor closed 7 years ago
The change is with composeWith
// BEFORE
this.composeWith('@console/xxx:yyy', { options: testsOptions });
// NOW
this.composeWith('@console/xxx:yyy', testsOptions);
There's no more need to options as the options
key.
Thank you!
I had code that worked in .23 of yeoman-generator that I am now attempting to port to 1.0. The generator calls:
this.composeWith('@console/xxx:yyy', { options: testsOptions });
where testsOptions is an object containing uiFramework, among other things: {"uiFramework":"React"}
Previously, this value was then available within the subgenerator at this.options.uiFramework. However it is now undefined. I tried adding this.option("uiFramework") to the subgenerator constructor but it didn't make a difference. If I look at the this.options object available in the subgenerator with JSON.stringify, it has the following form:
{"skip-install":false,"skip-cache":false,"options":{"composedFrom":"@console/xxx:zzz","uiFramework":"React"}} (with a lot removed).
That is, it looks like I'd need to call this.options.options.uiFramework? Is that correct or have I done something wrong?