@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
19 lines (18 loc) • 910 B
TypeScript
import { Tree } from '@nx/devkit';
/**
* Gets all source files in a project with caching to avoid repeated traversals.
*
* This function uses a cache to store the list of source files per project,
* which can significantly improve performance when the same project is
* accessed multiple times during a move operation.
*
* The cache is populated by traversing the project directory and filtering
* for files with supported source file extensions.
*
* @param tree - The virtual file system tree
* @param projectRoot - Root path of the project
* @param projectSourceFilesCache - Cache for source files per project
* @param fileExistenceCache - Cache for file existence checks
* @returns Array of source file paths
*/
export declare function getProjectSourceFiles(tree: Tree, projectRoot: string, projectSourceFilesCache: Map<string, string[]>, fileExistenceCache: Map<string, boolean>): string[];