-
Notifications
You must be signed in to change notification settings - Fork 469
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
[TS] Added outputGlobalTypes option to specify path for global types #546
Conversation
This is great! I think it would also be nice to be able to set the filename ( |
@williamboman Thats exactly what this option is for, the path includes the filename. For example: |
Oh shit, my bad! |
@danilobuerger thanks for submitting this! Could you update https://github.com/apollographql/apollo-cli/blob/master/CHANGELOG.md with what this PR is doing? |
@@ -95,6 +95,10 @@ export default class Generate extends Command { | |||
description: | |||
'By default, TypeScript/Flow will put each generated file in a directory next to its source file using the value of the "output" as the directory name. Set "outputFlat" to put all generated files in the directory relative to the current working directory defined by "output".' | |||
}), | |||
outputGlobalTypes: flags.string({ |
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.
Not doing a full review, but I think that outputGlobalTypes
is a strange name (and reads like a boolean) for a string that is meant to specify a file location to write global type information to. Perhaps something like globalTypesFilePath
?
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.
The intention was that it is aligned with the other output options (output
and outputFlat
) for easier grouping if they all begin with output...
. But I really don't care what the param is named :-)
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 agree outputGlobalTypes
feels a bit weird as a flag name. Maybe globalTypesFile
?
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.
@martijnwalraven I amended the commit
@zionts In this repo the Changelog is done on Publish. See https://github.com/apollographql/apollo-cli/commits/master/CHANGELOG.md not during PRs. |
Will this key work for swift target |
No description provided.