-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Add post processing to files generated by TS generators #1063
Conversation
|
||
@Override | ||
public void postProcessFile(File file, String fileType) { | ||
if (file == null) { |
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 suggest to call the parent method, too, since there could be some logic added later.
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.
Sure. I'll do it later.
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.
Done via 9573d8e
/** | ||
* Describes the result of uploading an image resource | ||
*/ | ||
* Describes the result of uploading an image resource |
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.
why was this changed? the generation parameters of the typescript-node
samples have not changed, so I guess this is because of a local test?
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 simply want to show the change made by prettier
.
I'll restore the old one before merging.
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.
Restore via 9573d8e
If no further feedback or question, I'll merge it tomorrow (Saturday) |
…#1063) * add file post proess to TS generators * update ts node petstore with prettier * update base on feedback
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
.master
,3.3.x
,4.0.x
. Default:master
.Description of the PR
Allow users to define the environment variable "TS_POST_PROCESS_FILE" to post process TS files generated by TS generators (e.g. Angular, Fetch, etc), e.g.
export TS_POST_PROCESS_FILE='/usr/local/bin/prettier --write'
Please refer to 07b2a36 for the code changes done by
prettier
as an example.cc @TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @nicokoenig (2018/09)