import { resolve } from 'path' ; export function getRootFile < T > ( name , rootDir = process . cwd ( ) ) { const path = resolve ( rootDir , name ) ; try { return { path , content : require ( path ) , isSuccessful : true , } ; } catch ( e ) { return { path , content : undefined , isSuccessful : false , } ; } }