{"size": 836, "ext": "js", "max_stars_repo_path": "lib/utils/copyFiles.js", "max_stars_repo_name": "dfranklinau/website-generator", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "lib/utils/copyFiles.js", "max_issues_repo_name": "dfranklinau/website-generator", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "lib/utils/copyFiles.js", "max_forks_repo_name": "dfranklinau/website-generator", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 44.0, "max_line_length": 115, "alphanum_fraction": 0.7033492823}
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.copyFiles = void 0;
const fs_1 = __importDefault(require("fs"));
const path_1 = __importDefault(require("path"));
const formatOutputFilePath_1 = require("./formatOutputFilePath");
const copyFiles = (files, dest, callback) => {
    files.forEach((file) => {
        const fileOutputPath = formatOutputFilePath_1.formatOutputFilePath(callback ? callback(file) : file, dest);
        const fileOutputDir = path_1.default.parse(fileOutputPath).dir;
        fs_1.default.mkdirSync(fileOutputDir, { recursive: true });
        fs_1.default.copyFileSync(file, fileOutputPath);
    });
};
exports.copyFiles = copyFiles;
