UNPKG

@codemod-utils/files

Version:
32 lines (31 loc) 721 B
import type { FilePath } from './types.js'; /** * Creates a mapping of file paths, which can then be passed to * `copyFiles()` or `moveFiles()`. * * @param filePaths * * An array of file paths. The array may come from `findFiles()`. * * @param options * * An object with `from` and `to`. * * @example * * Map `LICENSE.md` to `ember-container-query/LICENSE.md` (and * similarly for `README.md`). * * ```ts * const filePaths = ['LICENSE.md', 'README.md']; * * const filePathMap = mapFilePaths(filePaths, { * from: '', * to: 'ember-container-query', * }); * ``` */ export declare function mapFilePaths(filePaths: FilePath[], options: { from: string; to: string; }): Map<string, string>;