import chalk from 'chalk'; import logger from '../Logger'; import { CopyFileOptions, copyFileWithTransformsAsync } from '../Transforms'; /** * Copies vendored files from source directory to target directory * with transforms applied to their content and relative path. */ export async function copyVendoredFilesAsync( files: Set, options: Omit ): Promise { for (const sourceFile of files) { const { targetFile } = await copyFileWithTransformsAsync({ sourceFile, ...options }); if (sourceFile !== targetFile) { logger.log('📂 Renamed %s to %s', chalk.magenta(sourceFile), chalk.magenta(targetFile)); } } }