(filePath, rootDir)
| 62 | } |
| 63 | |
| 64 | function getDepth(filePath, rootDir) { |
| 65 | const relative = path.relative(rootDir, path.dirname(filePath)); |
| 66 | if (!relative) return 0; |
| 67 | return relative.split(path.sep).filter(Boolean).length; |
| 68 | } |
| 69 | |
| 70 | function buildReplacementPath(depth) { |
| 71 | const prefix = '../'.repeat(depth + 2); |
no outgoing calls
no test coverage detected