add umd globals export - fixes #375
This commit is contained in:
@@ -1,10 +1,16 @@
|
||||
(function (factory) {
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(["exports", "module"], factory);
|
||||
} else if (typeof exports !== "undefined" && typeof module !== "undefined") {
|
||||
factory(exports, module);
|
||||
} else {
|
||||
var module = {
|
||||
exports: {}
|
||||
};
|
||||
factory(module.exports, module);
|
||||
global.actual = module.exports;
|
||||
}
|
||||
})(function (exports, module) {
|
||||
})(this, function (exports, module) {
|
||||
"use strict";
|
||||
|
||||
var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
(function (factory) {
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(["exports", "foo"], factory);
|
||||
} else if (typeof exports !== "undefined") {
|
||||
factory(exports, require("foo"));
|
||||
} else {
|
||||
var module = {
|
||||
exports: {}
|
||||
};
|
||||
factory(module.exports, global.foo);
|
||||
global.actual = module.exports;
|
||||
}
|
||||
})(function (exports, _foo) {
|
||||
})(this, function (exports, _foo) {
|
||||
"use strict";
|
||||
|
||||
var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { "default": obj }; };
|
||||
@@ -24,4 +30,4 @@
|
||||
exports["default"] = _foo.foo;
|
||||
exports["default"] = _foo.foo;
|
||||
exports.bar = _foo.bar;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
(function (factory) {
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(["exports"], factory);
|
||||
} else if (typeof exports !== "undefined") {
|
||||
factory(exports);
|
||||
} else {
|
||||
var module = {
|
||||
exports: {}
|
||||
};
|
||||
factory(module.exports);
|
||||
global.actual = module.exports;
|
||||
}
|
||||
})(function (exports) {
|
||||
})(this, function (exports) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
@@ -17,4 +23,4 @@
|
||||
exports["default"] = foo;
|
||||
exports["default"] = foo;
|
||||
exports.bar = bar;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
(function (factory) {
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(["exports"], factory);
|
||||
} else if (typeof exports !== "undefined") {
|
||||
factory(exports);
|
||||
} else {
|
||||
var module = {
|
||||
exports: {}
|
||||
};
|
||||
factory(module.exports);
|
||||
global.actual = module.exports;
|
||||
}
|
||||
})(function (exports) {
|
||||
})(this, function (exports) {
|
||||
"use strict";
|
||||
|
||||
var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
(function (factory) {
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define("my custom module name", ["exports"], factory);
|
||||
} else if (typeof exports !== "undefined") {
|
||||
factory(exports);
|
||||
} else {
|
||||
var module = {
|
||||
exports: {}
|
||||
};
|
||||
factory(module.exports);
|
||||
global.actual = module.exports;
|
||||
}
|
||||
})(function (exports) {
|
||||
})(this, function (exports) {
|
||||
"use strict";
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
(function (factory) {
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(["exports", "./evens"], factory);
|
||||
} else if (typeof exports !== "undefined") {
|
||||
factory(exports, require("./evens"));
|
||||
} else {
|
||||
var module = {
|
||||
exports: {}
|
||||
};
|
||||
factory(module.exports, global.evens);
|
||||
global.actual = module.exports;
|
||||
}
|
||||
})(function (exports, _evens) {
|
||||
})(this, function (exports, _evens) {
|
||||
"use strict";
|
||||
|
||||
exports.nextOdd = nextOdd;
|
||||
@@ -23,4 +29,4 @@
|
||||
};
|
||||
})(isEven);
|
||||
exports.isOdd = isOdd;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
(function (factory) {
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(["exports", "foo"], factory);
|
||||
} else if (typeof exports !== "undefined") {
|
||||
factory(exports, require("foo"));
|
||||
} else {
|
||||
var module = {
|
||||
exports: {}
|
||||
};
|
||||
factory(module.exports, global.foo);
|
||||
global.actual = module.exports;
|
||||
}
|
||||
})(function (exports, _foo) {
|
||||
})(this, function (exports, _foo) {
|
||||
"use strict";
|
||||
|
||||
var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; };
|
||||
@@ -12,4 +18,4 @@
|
||||
var foo = _interopRequire(_foo);
|
||||
|
||||
var foo2 = _interopRequire(_foo);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
(function (factory) {
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(["exports", "foo"], factory);
|
||||
} else if (typeof exports !== "undefined") {
|
||||
factory(exports, require("foo"));
|
||||
} else {
|
||||
var module = {
|
||||
exports: {}
|
||||
};
|
||||
factory(module.exports, global.foo);
|
||||
global.actual = module.exports;
|
||||
}
|
||||
})(function (exports, _foo) {
|
||||
})(this, function (exports, _foo) {
|
||||
"use strict";
|
||||
|
||||
var foo = _foo;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
(function (factory) {
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(["exports", "foo"], factory);
|
||||
} else if (typeof exports !== "undefined") {
|
||||
factory(exports, require("foo"));
|
||||
} else {
|
||||
var module = {
|
||||
exports: {}
|
||||
};
|
||||
factory(module.exports, global.foo);
|
||||
global.actual = module.exports;
|
||||
}
|
||||
})(function (exports, _foo) {
|
||||
})(this, function (exports, _foo) {
|
||||
"use strict";
|
||||
|
||||
var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; };
|
||||
@@ -12,4 +18,4 @@
|
||||
var foo = _interopRequire(_foo);
|
||||
|
||||
var xyz = _foo.baz;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
(function (factory) {
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(["exports", "foo"], factory);
|
||||
} else if (typeof exports !== "undefined") {
|
||||
factory(exports, require("foo"));
|
||||
} else {
|
||||
var module = {
|
||||
exports: {}
|
||||
};
|
||||
factory(module.exports, global.foo);
|
||||
global.actual = module.exports;
|
||||
}
|
||||
})(function (exports, _foo) {
|
||||
})(this, function (exports, _foo) {
|
||||
"use strict";
|
||||
|
||||
var bar = _foo.bar;
|
||||
@@ -13,4 +19,4 @@
|
||||
var baz2 = _foo.bar;
|
||||
var baz3 = _foo.bar;
|
||||
var xyz = _foo.xyz;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
(function (factory) {
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(["exports", "foo", "foo-bar", "./directory/foo-bar"], factory);
|
||||
} else if (typeof exports !== "undefined") {
|
||||
factory(exports, require("foo"), require("foo-bar"), require("./directory/foo-bar"));
|
||||
} else {
|
||||
var module = {
|
||||
exports: {}
|
||||
};
|
||||
factory(module.exports, global.foo, global.fooBar, global.directoryFooBar);
|
||||
global.actual = module.exports;
|
||||
}
|
||||
})(function (exports, _foo, _fooBar, _directoryFooBar) {
|
||||
})(this, function (exports, _foo, _fooBar, _directoryFooBar) {
|
||||
"use strict";
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
(function (factory) {
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define("es6.modules-umd/module-name/expected", ["exports"], factory);
|
||||
} else if (typeof exports !== "undefined") {
|
||||
factory(exports);
|
||||
} else {
|
||||
var module = {
|
||||
exports: {}
|
||||
};
|
||||
factory(module.exports);
|
||||
global.actual = module.exports;
|
||||
}
|
||||
})(function (exports) {
|
||||
})(this, function (exports) {
|
||||
"use strict";
|
||||
|
||||
foobar();
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
(function (factory) {
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(["exports", "foo", "foo-bar", "./directory/foo-bar"], factory);
|
||||
} else if (typeof exports !== "undefined") {
|
||||
factory(exports, require("foo"), require("foo-bar"), require("./directory/foo-bar"));
|
||||
} else {
|
||||
var module = {
|
||||
exports: {}
|
||||
};
|
||||
factory(module.exports, global.foo2, global.fooBar, global.directoryFooBar);
|
||||
global.actual = module.exports;
|
||||
}
|
||||
})(function (exports, _foo, _fooBar, _directoryFooBar) {
|
||||
})(this, function (exports, _foo, _fooBar, _directoryFooBar) {
|
||||
"use strict";
|
||||
|
||||
var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; };
|
||||
@@ -23,4 +29,4 @@
|
||||
|
||||
exports.test2 = test2;
|
||||
exports["default"] = test;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
(function (factory) {
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(["exports"], factory);
|
||||
} else if (typeof exports !== "undefined") {
|
||||
factory(exports);
|
||||
} else {
|
||||
var module = {
|
||||
exports: {}
|
||||
};
|
||||
factory(module.exports);
|
||||
global.actual = module.exports;
|
||||
}
|
||||
})(function (exports) {
|
||||
})(this, function (exports) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
@@ -20,4 +26,4 @@
|
||||
test = 3;
|
||||
test++;
|
||||
})();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
(function (factory) {
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(["exports", "foo", "babel-runtime/es5/helpers/interop-require"], factory);
|
||||
} else if (typeof exports !== "undefined") {
|
||||
factory(exports, require("foo"), require("babel-runtime/es5/helpers/interop-require"));
|
||||
} else {
|
||||
var module = {
|
||||
exports: {}
|
||||
};
|
||||
factory(module.exports, global.foo, global._interopRequire);
|
||||
global.actual = module.exports;
|
||||
}
|
||||
})(function (exports, _foo, _babelRuntimeEs5HelpersInteropRequire) {
|
||||
})(this, function (exports, _foo, _babelRuntimeEs5HelpersInteropRequire) {
|
||||
"use strict";
|
||||
|
||||
var _interopRequire = _babelRuntimeEs5HelpersInteropRequire["default"];
|
||||
|
||||
var foo = _interopRequire(_foo);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user