Skip to content

Commit

Permalink
feat: log after execution
Browse files Browse the repository at this point in the history
  • Loading branch information
thekiba committed Feb 11, 2024
1 parent 90fc50a commit 3df7c61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ const cli = meow(`
Examples
$ tlb ./path/to/file.tlb
> Output: ./path/to/file.ts
> Generated code is saved to ./path/to/file.ts
$ tlb -o ./path/to/output.ts ./path/to/file.tlb
> Output: ./path/to/output.ts
> Generated code is saved to ./path/to/output.ts
$ tlb -l typescript ./path/to/file.tlb
> Output: ./path/to/file.ts
> Generated code is saved to ./path/to/file.ts
`, {
flags: {
output: {
Expand Down
1 change: 1 addition & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export function generateCodeWithGenerator(inputPath: string, outputPath: string,
const tree = ast(input)

fs.writeFile(outputPath, generateCodeByAST(tree, input, getGenerator), () => { });
console.log(`Generated code is saved to ${outputPath}`);
}

export function generateCode(inputPath: string, outputPath: string, resultLanguage: string) {
Expand Down

0 comments on commit 3df7c61

Please sign in to comment.