Skip to content

Commit 10be7cd

Browse files
committed
chore(utils): update file system utility function names
1 parent 37d3a65 commit 10be7cd

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/utils/extras.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { DEV_MODE } from "@/constants";
1313
// ==============================
1414

1515
export const writeFileAsync = util.promisify(fs.writeFile);
16-
export const fileExistsAsync = util.promisify(fs.exists);
16+
export const existsAsync = util.promisify(fs.exists);
1717
export const readFileAsync = util.promisify(fs.readFile);
1818
export const readDirAsync = util.promisify(fs.readdir);
1919
export const realPathAsync = util.promisify(fs.realpath);
@@ -24,7 +24,7 @@ export const rmdirAsync = util.promisify(fs.rm);
2424
* @description A function that exits the CLI
2525
*/
2626
export function exitCLI(): void {
27-
console.log(`See you soon ${emoji.get("blush")} !`);
27+
console.log(`See you soon ${emoji.get("blush")}`);
2828
process.exit();
2929
}
3030

@@ -132,7 +132,7 @@ export async function writeToFileAsync(
132132
successMessage: string,
133133
): Promise<void> {
134134
try {
135-
const fileExists = await fileExistsAsync(destination);
135+
const fileExists = await existsAsync(destination);
136136
let finalContent = content;
137137

138138
if (fileExists) {
@@ -174,7 +174,7 @@ export function successMessage(
174174
emojiCode: string,
175175
context: string,
176176
): string {
177-
return chalk.green(`${emoji.get(emojiCode)} ${file} ${context} ... [done]`)
177+
return chalk.green(`${emoji.get(emojiCode)} ${file} ${context} ... [done]`);
178178
}
179179

180180
/**

0 commit comments

Comments
 (0)