(file: string, root: string)
| 53 | } |
| 54 | |
| 55 | function htmlFileToUrl(file: string, root: string) { |
| 56 | const url = path.relative(root, file) |
| 57 | // out of root, ignore file |
| 58 | if (url[0] === '.') return |
| 59 | // file within root, create root-relative url |
| 60 | return '/' + normalizePath(url) |
| 61 | } |
| 62 | |
| 63 | function fileToUrl(file: string, root: string) { |
| 64 | const url = path.relative(root, file) |
no test coverage detected