{"size": 1547, "ext": "js", "max_stars_repo_path": "node_modules/fantasticon/lib/cli/logger.js", "max_stars_repo_name": "junaidbaiga/new", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "node_modules/fantasticon/lib/cli/logger.js", "max_issues_repo_name": "junaidbaiga/new", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "node_modules/fantasticon/lib/cli/logger.js", "max_forks_repo_name": "junaidbaiga/new", "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": 45.5, "max_line_length": 131, "alphanum_fraction": 0.6457659987}
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getLogger = void 0;
const cli_color_1 = __importDefault(require("cli-color"));
const string_1 = require("../utils/string");
const getLogger = (debug = false, silent = false) => ({
    error(error) {
        const message = (error instanceof Error && error.message) || error;
        console.log(cli_color_1.default.red(message));
        debug && error instanceof Error && console.log(error.stack);
    },
    log(...values) {
        !silent && console.log(...values);
    },
    start(loadedConfigPath = null) {
        this.log(cli_color_1.default.yellow(`Generating font kit...`));
        if (loadedConfigPath) {
            this.log(cli_color_1.default.green(`✔ Using configuration file: ${cli_color_1.default.green.bold(loadedConfigPath)}`));
        }
    },
    results({ assetsIn, writeResults, options: { inputDir } }) {
        const iconsCount = Object.values(assetsIn).length;
        this.log(cli_color_1.default.white(`✔ ${iconsCount} ${(0, string_1.pluralize)('SVG', iconsCount)} found in ${inputDir}`));
        for (const { writePath } of writeResults) {
            this.log(cli_color_1.default.blue(`✔ Generated`, cli_color_1.default.blueBright(writePath)));
        }
        this.log(cli_color_1.default.green.bold('Done'));
    }
});
exports.getLogger = getLogger;
//# sourceMappingURL=logger.js.map