-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(wip): support new options #37
base: main
Are you sure you want to change the base?
Conversation
"@nestjs/schematics": "^9.0.3", | ||
"@types/jasmine": "~4.3.0", | ||
"@types/node": "^18.7.18", | ||
"commander": "^9.4.0", | ||
"loading-cli": "^1.1.0" | ||
"loading-cli": "^1.1.0", | ||
"inquirer": "^8.2.5" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To remove
import * as inquirer from 'inquirer'; | ||
|
||
export async function promptInput({ | ||
name, message, defaultAnswer, | ||
}: {name: string; message: string; defaultAnswer: string}): Promise<inquirer.Answers> { | ||
return inquirer.createPromptModule()([{type: 'input', name, message, default: defaultAnswer}]); | ||
} | ||
|
||
export async function promptSelect({ | ||
name, message, choices, defaultAnswer, | ||
}: {name: string; message: string; choices: string[]; defaultAnswer: string}): Promise<inquirer.Answers> { | ||
return inquirer.createPromptModule({})([{type: 'select', name, message, choices, default: defaultAnswer}]); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To remove
// private static formatNewOptions(options: string[]): string { | ||
// const formattedOptions = options.filter(Boolean).join(' '); | ||
// if (options.includes('--skip-install')) { | ||
// return formattedOptions; | ||
// } | ||
// | ||
// return `${formattedOptions} --skip-install`; | ||
// } | ||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To remove
export function addDashes(args: string[]): string[] { | ||
return args.map(arg => `--${arg}`); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To remove
What’s the focus of this PR
Briefly describe the pull request and what it does.
How to review this PR
Is it something the reviewers should know about when reviewing this PR?
Before submitting this PR, I made sure: