mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
fix(loader): allow AMD loader to be used within Node env
Because of the ordering of the loader, it's not possible use AMD within a Node environment.
This commit is contained in:
parent
466a2eba94
commit
ff24bdba9f
|
@ -1,16 +1,16 @@
|
|||
var root = this;
|
||||
|
||||
// CommonJS/nodeJS Loader
|
||||
if (typeof module !== 'undefined' && module.exports) {
|
||||
module.exports = showdown;
|
||||
|
||||
// AMD Loader
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define(function () {
|
||||
'use strict';
|
||||
return showdown;
|
||||
});
|
||||
|
||||
// CommonJS/nodeJS Loader
|
||||
} else if (typeof module !== 'undefined' && module.exports) {
|
||||
module.exports = showdown;
|
||||
|
||||
// Regular Browser loader
|
||||
} else {
|
||||
root.showdown = showdown;
|
||||
|
|
Loading…
Reference in New Issue
Block a user