dts-bundle-generator
Version:
DTS Bundle Generator
10 lines (9 loc) • 313 B
JavaScript
import * as path from 'path';
import * as process from 'process';
import { fixPath } from './fix-path.js';
export function getAbsolutePath(fileName, cwd) {
if (!path.isAbsolute(fileName)) {
fileName = path.join(cwd !== undefined ? cwd : process.cwd(), fileName);
}
return fixPath(fileName);
}