Skip to content
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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

neodmy
Copy link
Contributor

@neodmy neodmy commented Dec 13, 2022

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:

  • The code builds clean without any errors or warnings
  • I'm using our guidelines
  • I've added unit tests if feasible

"@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"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To remove

Comment on lines +1 to +13
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}]);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To remove

Comment on lines +11 to +19
// private static formatNewOptions(options: string[]): string {
// const formattedOptions = options.filter(Boolean).join(' ');
// if (options.includes('--skip-install')) {
// return formattedOptions;
// }
//
// return `${formattedOptions} --skip-install`;
// }
//
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To remove

Comment on lines +28 to +30
export function addDashes(args: string[]): string[] {
return args.map(arg => `--${arg}`);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To remove

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant