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

15 lines (14 loc) 714 B
import type { Tree } from '@nx/devkit'; import type { ProjectConfiguration } from '@nx/devkit'; /** * Ensures the file is exported from the target project's entrypoint. * * This function adds an export statement to the project's index file. * If the export already exists, it does nothing to avoid duplicates. * * @param tree - The virtual file system tree. * @param project - Project configuration. * @param file - Relative file path within project (e.g., "lib/utils.ts"). * @param cachedTreeExists - Cached tree.exists() function. */ export declare function ensureFileExported(tree: Tree, project: ProjectConfiguration, file: string, cachedTreeExists: (tree: Tree, filePath: string) => boolean): void;