Skip to content

Commit 80b6a44

Browse files
author
Peter Ullrich
committed
subscribeSharedOption
1 parent 05e272e commit 80b6a44

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.2.3",
2+
"version": "0.2.4",
33
"name": "dotup-typescript-yeoman-generators",
44
"author": {
55
"name": "Peter Ullrich",

src/BaseGenerator.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ export abstract class BaseGenerator<TStep extends string> extends generator impl
2323
static counter: number = 0;
2424
static sharedOptions: SharedOptions<string>;
2525

26-
26+
2727
public get sharedOptions(): SharedOptions<TStep> {
2828
return BaseGenerator.sharedOptions;
2929
}
30-
30+
3131
readonly projectInfo: ProjectInfo;
3232
private readonly doNotEjsReplace: string[] = [];
3333

@@ -62,6 +62,10 @@ export abstract class BaseGenerator<TStep extends string> extends generator impl
6262
this.composeWith(require.resolve('generator'), optArgs);
6363
}
6464

65+
subscribeSharedOption(questionName: TStep | string): void {
66+
this.sharedOptions.subscribe(this, questionName);
67+
}
68+
6569
addSkipEjsReplacement(targetPath: string): void {
6670
this.doNotEjsReplace.push(targetPath);
6771
}

0 commit comments

Comments
 (0)