Navigation Menu

Skip to content

Commit

Permalink
chore: refactored the add-generator
Browse files Browse the repository at this point in the history
refactored the code to suppport for better user input handling
  • Loading branch information
anikethsaha committed Jun 5, 2019
1 parent 1b49075 commit 80713fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/generators/add-generator.ts
Expand Up @@ -308,7 +308,7 @@ export default class AddGenerator extends Generator {
.pop()
.replace(".js", "")
)
.find((p: string): boolean => p.toLowerCase().indexOf(answeredPluginName) >= 0);
.find((p: string): boolean => p.toLowerCase().indexOf(answeredPluginName) >= 0 || p.indexOf(answeredPluginName) >= 0);

if (pluginExist) {
this.configuration.config.item = pluginExist;
Expand All @@ -323,7 +323,7 @@ export default class AddGenerator extends Generator {
.split("/")
.pop()
.replace(".json", "")
.indexOf(answeredPluginName) >= 0
.indexOf(pluginExist) >= 0
);
if (pluginsSchemaPath) {
const constructorPrefix: string =
Expand Down

0 comments on commit 80713fc

Please sign in to comment.