ethers.js/src.ts/_admin/utils/path.ts

14 lines
385 B
TypeScript
Raw Permalink Normal View History

2022-09-05 16:14:43 -04:00
import { dirname, resolve as _resolve } from "path";
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
export const ROOT = _resolve(__dirname, "../../../");
export function resolve(...args: Array<string>): string {
args = args.slice();
args.unshift(ROOT);
return _resolve.apply(null, args);
}