Skip to content

Commit

Permalink
feat(utils/file): adds absolute
Browse files Browse the repository at this point in the history
  • Loading branch information
rafamel committed Apr 28, 2019
1 parent c4202cf commit 69532e0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/utils/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import fs from 'fs-extra';
import up from 'find-up';
import { rejects } from 'errorish';

export function absolute(relative: string, cwd: string): string {
return path.isAbsolute(relative) ? relative : path.join(cwd, relative);
}

export async function exists(
file: string,
options: { fail?: boolean } = {}
Expand Down

0 comments on commit 69532e0

Please sign in to comment.