diff --git a/ansi_up.js b/ansi_up.js index fd396d3..4363585 100644 --- a/ansi_up.js +++ b/ansi_up.js @@ -3,22 +3,20 @@ * license : MIT * http://github.com/drudru/ansi_up */ -(function (factory) { - var v; - if (typeof module === "object" && typeof module.exports === "object") { - v = factory(require, exports); - if ("undefined" !== typeof v) module.exports = v; +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['exports'], factory); + } else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') { + // CommonJS + factory(exports); + } else { + // Browser globals + var exp = {}; + factory(exp); + root.AnsiUp = exp.default; } - else if ("function" === typeof define && define.amd) { - define(["require", "exports"], factory); - } - else { - var req, exp = {}; - v = factory(req, exp); - window.AnsiUp = exp.default; - } -})(function (require, exports) { - +}(this, function (exports) { "use strict"; function rgx(tmplObj) { var subst = []; @@ -333,4 +331,4 @@ var AnsiUp = (function () { //# sourceMappingURL=ansi_up.js.map Object.defineProperty(exports, "__esModule", { value: true }); exports.default = AnsiUp; -}); \ No newline at end of file +})); diff --git a/dist/ansi_up.js.include b/dist/ansi_up.js.include index a77f312..f0d4324 100644 --- a/dist/ansi_up.js.include +++ b/dist/ansi_up.js.include @@ -11,7 +11,7 @@ function rgx(tmplObj) { } var AnsiUp = (function () { function AnsiUp() { - this.VERSION = "2.0.0"; + this.VERSION = "2.0.1"; this.ansi_colors = [ [ { rgb: [0, 0, 0], class_name: "ansi-black" }, diff --git a/umd.footer b/umd.footer index 924ca84..9e5a476 100644 --- a/umd.footer +++ b/umd.footer @@ -1,4 +1,4 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = AnsiUp; -}); \ No newline at end of file +})); diff --git a/umd.header b/umd.header index 8210c07..2c4a121 100644 --- a/umd.header +++ b/umd.header @@ -3,19 +3,17 @@ * license : MIT * http://github.com/drudru/ansi_up */ -(function (factory) { - var v; - if (typeof module === "object" && typeof module.exports === "object") { - v = factory(require, exports); - if ("undefined" !== typeof v) module.exports = v; +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['exports'], factory); + } else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') { + // CommonJS + factory(exports); + } else { + // Browser globals + var exp = {}; + factory(exp); + root.AnsiUp = exp.default; } - else if ("function" === typeof define && define.amd) { - define(["require", "exports"], factory); - } - else { - var req, exp = {}; - v = factory(req, exp); - window.AnsiUp = exp.default; - } -})(function (require, exports) { - +}(this, function (exports) {