File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 11{
2- "version" : " 0.3.0 " ,
2+ "version" : " 0.3.1 " ,
33 "name" : " dotup-typescript-yeoman-generators" ,
44 "author" : {
55 "name" : " Peter Ullrich" ,
Original file line number Diff line number Diff line change @@ -45,11 +45,11 @@ export abstract class BaseGenerator<TStep extends string> extends generator impl
4545
4646 currentStep : TStep ;
4747
48- constructor ( args : string | string [ ] , options : GeneratorOptions < TStep > , sharedOptions ?: SharedOptions < TStep > ) {
48+ constructor ( args : string | string [ ] , options : GeneratorOptions < TStep > ) {
4949 super ( args , options ) ;
5050
5151 BaseGenerator . counter += 1 ;
52- BaseGenerator . sharedOptions = sharedOptions ; // (<IProperty>options)['sharedOptions'];
52+ BaseGenerator . sharedOptions = ( < IProperty > options ) [ ' sharedOptions' ] ; // (<IProperty>options)['sharedOptions'];
5353
5454 this . generatorName = this . constructor . name ;
5555 this . projectInfo = new ProjectInfo ( ) ;
@@ -58,8 +58,12 @@ export abstract class BaseGenerator<TStep extends string> extends generator impl
5858 }
5959
6060 compose ( generator : string , passThroughAnswers : boolean = true , options ?: any ) : void {
61- const optArgs = passThroughAnswers ? this . answers : options ;
62- this . composeWith ( require . resolve ( 'generator' ) , optArgs ) ;
61+ const optArgs = options ;
62+ if ( passThroughAnswers ) {
63+ _ . merge ( optArgs , this . answers ) ;
64+ }
65+ optArgs [ 'sharedOptions' ] = this . sharedOptions ;
66+ this . composeWith ( require . resolve ( generator ) , optArgs ) ;
6367 }
6468
6569 trySubscribeSharedOption ( questionName : TStep | string ) : void {
You can’t perform that action at this time.
0 commit comments