UNPKG

hikaru-coffee

Version:

A static site generator that generates routes based on directories naturally.

45 lines (33 loc) 863 B
// Generated by CoffeeScript 2.3.1 (function() { var Logger, Promise, colors; colors = require("colors/safe"); Promise = require("bluebird"); Logger = class Logger extends console.Console { constructor(debug, options = { "stdout": process.stdout, "stderr": process.stderr }) { super(options); this.isDebug = debug; } log(...strs) { return super.log("LOG:", ...strs); } info(...strs) { return super.info(colors.blue("INFO:"), ...strs); } debug(...strs) { if (this.isDebug) { return super.debug(colors.green("DEBUG:"), ...strs); } } warn(...strs) { return super.warn(colors.yellow("WARN:"), ...strs); } error(...strs) { return super.error(colors.red("ERROR:"), ...strs); } }; module.exports = Logger; }).call(this);