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:
Jason Mitchell 2017-08-27 11:20:48 -07:00 committed by Estevão Soares dos Santos
parent 466a2eba94
commit ff24bdba9f

View File

@ -1,16 +1,16 @@
var root = this; var root = this;
// CommonJS/nodeJS Loader
if (typeof module !== 'undefined' && module.exports) {
module.exports = showdown;
// AMD Loader // AMD Loader
} else if (typeof define === 'function' && define.amd) { if (typeof define === 'function' && define.amd) {
define(function () { define(function () {
'use strict'; 'use strict';
return showdown; return showdown;
}); });
// CommonJS/nodeJS Loader
} else if (typeof module !== 'undefined' && module.exports) {
module.exports = showdown;
// Regular Browser loader // Regular Browser loader
} else { } else {
root.showdown = showdown; root.showdown = showdown;