Skip to content

Commit dbc3e9e

Browse files
committed
fix(add): fix runTransform
rephrase question
1 parent 163b309 commit dbc3e9e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/generators/add-generator.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,11 @@ export default class AddGenerator extends Generator {
164164
} else {
165165
if (action === "topScope") {
166166
return this.prompt([
167-
Input("topScope", "Enter line you want to add to topScope"),
167+
Input("topScope", "What do you want to add to topScope?"),
168168
])
169-
.then((topScopeAnswer) => {
169+
.then((topScopeAnswer: {
170+
topScope: string
171+
}) => {
170172
this.configuration.config.topScope.push(topScopeAnswer.topScope);
171173
done();
172174
});

packages/utils/scaffold.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default function runTransform(transformConfig: ITransformConfig, action:
4444

4545
const transformations: string[] = mapOptionsToTransform(config);
4646

47-
if (config.topScope) {
47+
if (config.topScope && transformations.indexOf("topScope") === -1) {
4848
transformations.push("topScope");
4949
}
5050

0 commit comments

Comments
 (0)