UNPKG

@nxworker/workspace

Version:

Nx plugin providing generators for managing workspace files, including the move-file generator for safely moving files between projects while updating all imports

10 lines (9 loc) 485 B
/** * Calculates the relative import specifier from one file to another. * The result is normalized and has the file extension stripped (except for ESM files). * * @param fromFilePath - The source file path (where the import is) * @param toFilePath - The target file path (what is being imported) * @returns The relative import specifier (e.g., './lib/utils', '../shared') */ export declare function getRelativeImportSpecifier(fromFilePath: string, toFilePath: string): string;