15 lines
404 B
TypeScript
15 lines
404 B
TypeScript
|
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, "../../../");
|
||
|
console.log(ROOT);
|
||
|
|
||
|
export function resolve(...args: Array<string>): string {
|
||
|
args = args.slice();
|
||
|
args.unshift(ROOT);
|
||
|
return _resolve.apply(null, args);
|
||
|
}
|