Skip to content

Commit 80713fc

Browse files
committedJun 5, 2019
chore: refactored the add-generator
refactored the code to suppport for better user input handling
1 parent 1b49075 commit 80713fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎packages/generators/add-generator.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ export default class AddGenerator extends Generator {
308308
.pop()
309309
.replace(".js", "")
310310
)
311-
.find((p: string): boolean => p.toLowerCase().indexOf(answeredPluginName) >= 0);
311+
.find((p: string): boolean => p.toLowerCase().indexOf(answeredPluginName) >= 0 || p.indexOf(answeredPluginName) >= 0);
312312

313313
if (pluginExist) {
314314
this.configuration.config.item = pluginExist;
@@ -323,7 +323,7 @@ export default class AddGenerator extends Generator {
323323
.split("/")
324324
.pop()
325325
.replace(".json", "")
326-
.indexOf(answeredPluginName) >= 0
326+
.indexOf(pluginExist) >= 0
327327
);
328328
if (pluginsSchemaPath) {
329329
const constructorPrefix: string =

0 commit comments

Comments
 (0)