Skip to content

Commit

Permalink
Output checking directory underlined
Browse files Browse the repository at this point in the history
  • Loading branch information
knutkirkhorn committed May 17, 2023
1 parent 388de30 commit 9c3b8b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import path from 'node:path';
import fs from 'node:fs/promises';
import logSymbols from 'log-symbols';
import chalk from 'chalk';

async function isDirectory(directoryPath) {
try {
Expand Down Expand Up @@ -67,7 +68,7 @@ async function checkDirectoryFiles(directoryPath) {

export async function checkRepoFiles(directoryPath = process.cwd()) {
const parsedDirectoryPath = path.resolve(directoryPath);
console.log(`Checking \`${parsedDirectoryPath}\`...`);
console.log(`\n${chalk.underline(parsedDirectoryPath)}`);

const {isDirectory: isPathDirectory} = await isDirectory(parsedDirectoryPath);

Expand All @@ -84,7 +85,7 @@ export async function checkRepoFiles(directoryPath = process.cwd()) {
const subDirectories = await getSubDirectories(parsedDirectoryPath);

for (const subDirectory of subDirectories) {
console.log('\nChecking', subDirectory);
console.log(`\n${chalk.underline(subDirectory)}`);
await checkDirectoryFiles(subDirectory);
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
},
"homepage": "https://github.com/knutkirkhorn/sofic#readme",
"dependencies": {
"chalk": "^5.2.0",
"log-symbols": "^5.1.0",
"meow": "^12.0.1"
},
Expand Down

0 comments on commit 9c3b8b8

Please sign in to comment.