(params: GetDictionaryPathParams)
| 8 | relativeFilePath: string; |
| 9 | }; |
| 10 | export const getDictionaryPath = (params: GetDictionaryPathParams) => { |
| 11 | const toFile = path.resolve( |
| 12 | params.sourceRoot, |
| 13 | params.lingoDir, |
| 14 | LCP_DICTIONARY_FILE_NAME, |
| 15 | ); |
| 16 | const fromDir = path.dirname( |
| 17 | path.resolve(params.sourceRoot, params.relativeFilePath), |
| 18 | ); |
| 19 | const relativePath = path.relative(fromDir, toFile); |
| 20 | const normalizedPath = relativePath.split(path.sep).join(path.posix.sep); |
| 21 | return `./${normalizedPath}`; |
| 22 | }; |
no outgoing calls
no test coverage detected