-
Notifications
You must be signed in to change notification settings - Fork 378
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
feat: Add skip import option to generate command #1580
Conversation
@@ -121,7 +121,10 @@ const mapSchematicOptions = (inputs: Input[]): SchematicOption[] => { | |||
const options: SchematicOption[] = []; | |||
inputs.forEach((input) => { | |||
if (!excludedInputNames.includes(input.name) && input.value !== undefined) { | |||
options.push(new SchematicOption(input.name, input.value)); | |||
const keepInputName = input.options |
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.
what is this keepInputName
for? can't we have the --skip-import
flag without adding this logic? 🤔
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.
I don't think it's possible.
If an option is passed in, it will be handled by default. So that the skipImport passed to the schema can't match.
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.
got it, thanks. Looks like this is a limitation of that SchematicOption#toCommandString
method as it expects that long names for flags should be translated to kebab case
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.
Yes, Schematic Option#toCommandString
affects the parameters ultimately passed to Schema
.
@kamilmysliwiec could we get some attention on the PR? |
lgtm |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
When using the
generate
command you can skip theservice
controller
automatic import intomodule
by adding--skip-import
Does this PR introduce a breaking change?
Other information