{"size": 718, "ext": "js", "max_stars_repo_path": "loaders/ascii-image-loader.js", "max_stars_repo_name": "jouni-kantola/build-a-build-with-a-webpack-plugin", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "loaders/ascii-image-loader.js", "max_issues_repo_name": "jouni-kantola/build-a-build-with-a-webpack-plugin", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "loaders/ascii-image-loader.js", "max_forks_repo_name": "jouni-kantola/build-a-build-with-a-webpack-plugin", "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": 21.1176470588, "max_line_length": 61, "alphanum_fraction": 0.5543175487}
const asciify = require("../utils/asciify-image");
const Convert = require("ansi-to-html");

module.exports = function(content) {
  const callback = this.async();

  asciify(
    content,
    {
      fit: "box",
      width: 30,
      height: 30
    },
    function(asciified) {
      var convert = new Convert({
        newline: true
      });
      
      const html = JSON.stringify(convert.toHtml(asciified));

      const result = `module.exports = function() { 
          var logo = document.createElement('div');
          logo.style.fontFamily = "monospace";
          logo.innerHTML = ${html};
          return logo;
        };`;
      
      callback(null, result);
    }
  );
};

module.exports.raw = true;
