(fileOrDir: string, root?: string)
| 6 | export const JSX_REG = /\.[tj]sx(\?.*)?$/; |
| 7 | |
| 8 | export function pathWithRoot(fileOrDir: string, root?: string): string { |
| 9 | if (path.isAbsolute(fileOrDir)) return fileOrDir; |
| 10 | |
| 11 | if (root === undefined) { |
| 12 | return path.join(Deno.cwd(), fileOrDir); |
| 13 | } |
| 14 | |
| 15 | if (path.isAbsolute(root)) return path.join(root, fileOrDir); |
| 16 | |
| 17 | return path.join(Deno.cwd(), root, fileOrDir); |
| 18 | } |
| 19 | |
| 20 | export interface FreshState { |
| 21 | namer: UniqueNamer; |
no test coverage detected