Skip to content

Commit

Permalink
Merge pull request #42 from doughsay/fix-umd
Browse files Browse the repository at this point in the history
Fix UMD implementation
  • Loading branch information
drudru authored Jun 27, 2017
2 parents 29ce78c + ff1741d commit 7de540c
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 33 deletions.
30 changes: 14 additions & 16 deletions ansi_up.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand Down Expand Up @@ -333,4 +331,4 @@ var AnsiUp = (function () {
//# sourceMappingURL=ansi_up.js.map
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = AnsiUp;
});
}));
2 changes: 1 addition & 1 deletion dist/ansi_up.js.include
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
Expand Down
2 changes: 1 addition & 1 deletion umd.footer
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

Object.defineProperty(exports, "__esModule", { value: true });
exports.default = AnsiUp;
});
}));
28 changes: 13 additions & 15 deletions umd.header
Original file line number Diff line number Diff line change
Expand Up @@ -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) {

0 comments on commit 7de540c

Please sign in to comment.