Skip to content

Commit

Permalink
feat(cli): print relative path to file instead of file name in the su…
Browse files Browse the repository at this point in the history
…ccess message (#80)
  • Loading branch information
Leo4815162342 authored May 29, 2022
1 parent 9ca3c2c commit 7f6d374
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/cli/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node

import { resolve } from 'path';
import { resolve, join } from 'path';
import { progressBar } from './progress';
import { outputFile } from 'fs-extra';
import { isValid, validationErrors, input } from './config';
Expand Down Expand Up @@ -158,7 +158,8 @@ const filePath = resolve(folderPath, fileName);
].join('\n')
);
} else {
printSuccess(`√ File saved: ${chalk.bold(fileName)}`);
const relativeFilePath = join(dir, fileName);
printSuccess(`√ File saved: ${chalk.bold(relativeFilePath)}`);
}
} else {
printErrors(
Expand Down

0 comments on commit 7f6d374

Please sign in to comment.