feat: say hello to umd ()

fix/workaround/#26
Sukka committed by GitHub
parent aea1f76ec6
commit 33e1ea4f54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -21,6 +21,21 @@
* @param {number} disqusjs.page.length - How many comment in the thread * @param {number} disqusjs.page.length - How many comment in the thread
*/ */
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define('DisqusJS', [], factory);
} else if (typeof module === 'object' && module.exports) {
// Node. Does not work with strict CommonJS, but
// only CommonJS-like environments that support module.exports,
// like Node.
module.exports = factory();
} else {
// Browser globals (root as window)
root.DisqusJS = factory();
}
}(typeof self !== 'undefined' ? self : this, function () {
function DisqusJS(config) { function DisqusJS(config) {
/* /*
* get - 封装 XHR GET * get - 封装 XHR GET
@ -612,4 +627,5 @@ function DisqusJS(config) {
} }
} }
export default DisqusJS; return DisqusJS
}));

Loading…
Cancel
Save