chore: clean up unused code

This commit is contained in:
Igor Randjelovic
2021-03-29 01:20:43 +02:00
parent 7594d00ed9
commit c55782bfaf
3 changed files with 23 additions and 42 deletions

View File

@ -19,9 +19,7 @@ interface IPackageJson {
* Utility function to get the contents of the project package.json
*/
export function getPackageJson() {
return require(
getProjectFilePath('package.json')
) as IPackageJson;
return require(getProjectFilePath('package.json')) as IPackageJson;
}
/**
@ -31,3 +29,22 @@ export function getPackageJson() {
export function getProjectFilePath(filePath: string): string {
return resolve(getProjectRootPath(), filePath);
}
// unused helper, but keeping it here as we may need it
// todo: remove if unused for next few releases
// function findFile(fileName, currentDir): string | null {
// // console.log(`findFile(${fileName}, ${currentDir})`)
// const path = resolve(currentDir, fileName);
//
// if (existsSync(path)) {
// return path;
// }
//
// // bail if we reached the root dir
// if (currentDir === resolve('/')) {
// return null;
// }
//
// // traverse to the parent folder
// return findFile(fileName, resolve(currentDir, '..'));
// }