Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix UMD implementation #42

Merged
merged 3 commits into from
Jun 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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) {