UNPKG

@oazmi/build-tools

Version:

general deno build tool scripts which I practically use in all of my typescript repos

24 lines 804 B
/** * Return the relative path from `from` to `to` based on current working * directory. * * @example Usage * ```ts * import { relative } from "@std/path/relative"; * import { assertEquals } from "@std/assert/assert-equals"; * * if (Deno.build.os === "windows") { * const path = relative("C:\\foobar\\test\\aaa", "C:\\foobar\\impl\\bbb"); * assertEquals(path, "..\\..\\impl\\bbb"); * } else { * const path = relative("/data/foobar/test/aaa", "/data/foobar/impl/bbb"); * assertEquals(path, "../../impl/bbb"); * } * ``` * * @param from Path in current working directory. * @param to Path in current working directory. * @returns The relative path from `from` to `to`. */ export declare function relative(from: string, to: string): string; //# sourceMappingURL=relative.d.ts.map