Introduce a config module to manage configuration (#22)

* Introduce a config module to manage configuration

* Remove public modifier
This commit is contained in:
Jaana Dogan
2025-04-18 11:12:18 -07:00
committed by GitHub
parent e1fac40256
commit 3afaa8033b
10 changed files with 131 additions and 174 deletions

View File

@@ -1,13 +1,5 @@
import process from 'node:process';
import path from 'node:path'; // Import the 'path' module
/**
* Returns the target directory, using the provided argument or the current working directory.
*/
export function getTargetDirectory(targetDirArg: string | undefined): string {
return targetDirArg || process.cwd();
}
/**
* Shortens a path string if it exceeds maxLen, prioritizing the start and end segments.
* Example: /path/to/a/very/long/file.txt -> /path/.../long/file.txt