From e15781f8610f4f7f3fca3f5f9e1a41d65e53a209 Mon Sep 17 00:00:00 2001 From: Erick Zhao Date: Tue, 20 Feb 2024 14:15:53 -0800 Subject: [PATCH] fix: print full file path in CLI (#258) --- src/bin.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bin.ts b/src/bin.ts index 24714dd..958bc80 100644 --- a/src/bin.ts +++ b/src/bin.ts @@ -45,16 +45,17 @@ const resolvedOutDir = runner.text = chalk.cyan(`Generating API in directory: ${chalk.yellow(`"${resolvedOutDir}"`)}`); const start = Date.now(); +const resolvedFilePath = path.resolve(resolvedOutDir, './electron.d.ts'); fs.mkdirp(resolvedOutDir).then(() => generateDefinitions({ electronApi: require(resolvedApi), }) - .then(data => fs.writeFile(path.resolve(resolvedOutDir, './electron.d.ts'), data)) + .then(data => fs.writeFile(resolvedFilePath, data)) .then(() => runner.succeed( `${chalk.green('Electron Typescript Definitions generated in')} ${chalk.yellow( - `"${resolvedOutDir}"`, + `"${resolvedFilePath}"`, )} took ${chalk.cyan(pretty(Date.now() - start))}`, ), )