Skip to content

Commit bcb0b30

Browse files
authored
Merge pull request #497 from tokuhirom/prettier
Apply prettier for generated files
2 parents 5c2556c + 0c6cf1d commit bcb0b30

File tree

301 files changed

+7695
-8813
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

301 files changed

+7695
-8813
lines changed

.prettierignore

Lines changed: 0 additions & 10 deletions
This file was deleted.

generate-code.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
44

55

66
def run_command(command):
7+
env = os.environ.copy()
8+
env['TS_POST_PROCESS_FILE'] = 'npx prettier --write'
9+
710
print(command)
8-
proc = subprocess.run(command, shell=True, text=True, capture_output=True)
11+
proc = subprocess.run(command, shell=True, text=True, capture_output=True, env=env)
912

1013
if len(proc.stdout) != 0:
1114
print("\n\nSTDOUT:\n\n")
@@ -45,6 +48,7 @@ def generate_clients():
4548
org.openapitools.codegen.OpenAPIGenerator \\
4649
generate \\
4750
-g line-bot-sdk-nodejs-generator \\
51+
--enable-post-process-file \\
4852
-o {output_path} \\
4953
-i line-openapi/{sourceYaml} \\
5054
'''
@@ -62,6 +66,7 @@ def generate_webhook():
6266
org.openapitools.codegen.OpenAPIGenerator \\
6367
generate \\
6468
--global-property apiTest=false,modelDocs=false,apiDocs=false \\
69+
--enable-post-process-file \\
6570
-g line-bot-sdk-nodejs-generator \\
6671
-o {output_path} \\
6772
-i line-openapi/{source_yaml} \\

lib/channel-access-token/api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// This is the entrypoint for the package
2-
export * from './api/apis';
3-
export * from './model/models';
2+
export * from "./api/apis";
3+
export * from "./model/models";

lib/channel-access-token/api/apis.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
export { ChannelAccessTokenClient } from './channelAccessTokenClient';
2-
1+
export { ChannelAccessTokenClient } from "./channelAccessTokenClient";

0 commit comments

Comments
 (0)