Logger.js 655 B

1234567891011121314151617181920
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var Logger = /** @class */ (function () {
  4. function Logger(stats) {
  5. this.stats = stats;
  6. }
  7. Logger.prototype.warn = function (compilation, message) {
  8. if (this.stats.warnings) {
  9. compilation.warnings.push("" + Logger.LOG_PREFIX + message);
  10. }
  11. };
  12. Logger.prototype.error = function (compilation, message) {
  13. if (this.stats.errors) {
  14. compilation.errors.push("" + Logger.LOG_PREFIX + message);
  15. }
  16. };
  17. Logger.LOG_PREFIX = 'license-webpack-plugin: ';
  18. return Logger;
  19. }());
  20. exports.Logger = Logger;