UNPKG

@codemod-utils/files

Version:
32 lines (31 loc) 672 B
import type { FileMap, Options } from './types.js'; /** * Creates files. Creates the destination directory if it doesn't * exist. * * @param fileMap * * A mapping between the file path and the file content (UTF-8). * * @param options * * An object with `projectRoot`. * * @example * * Create `LICENSE.md` and `README.md` in the project root. * * ```ts * const fileMap = new Map([ * ['LICENSE.md', 'The MIT License (MIT)'], * ['README.md', '# ember-container-query'], * ]); * * createFiles(fileMap, { * projectRoot, * }); * ``` */ export declare function createFiles(fileMap: FileMap, options: Options & { projectRoot: string; }): void;