Skip to content

Commit

Permalink
Fix the missing custom types output file in list-output (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuorantan authored Jan 19, 2022
1 parent 2e4f93d commit 2d1c288
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ts-gyb",
"version": "0.7.0",
"version": "0.7.1",
"description": "Generate Native API based on TS interface",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions src/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ function listOutput(args: { config: string; language?: 'swift' | 'kotlin'; expan
if (renderingConfig === undefined) {
throw new Error(`Language ${args.language} is not defined in the configuration file`);
}
files = Object.values(renderingConfig.outputPath);
files = Object.values(renderingConfig.outputPath).concat(renderingConfig.namedTypesOutputPath);
} else {
files = Object.values(config.rendering).map((renderingConfig: RenderConfiguration) => Object.values(renderingConfig.outputPath)).flat();
files = Object.values(config.rendering).map((renderingConfig: RenderConfiguration) => Object.values(renderingConfig.outputPath).concat(renderingConfig.namedTypesOutputPath)).flat();
}

files = files.map((file) => path.resolve(file));
Expand Down

0 comments on commit 2d1c288

Please sign in to comment.