make commonjs api work with non-global module, expose amd api
This commit is contained in:
parent
d258b9687b
commit
78c422448a
1 changed files with 2 additions and 1 deletions
|
|
@ -417,7 +417,8 @@ new function(window) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window.module) window.module.exports = m
|
if (typeof module != "undefined" && module !== null) module.exports = m
|
||||||
|
if (typeof define == "function" && define.amd) define(function() {return m})
|
||||||
|
|
||||||
//testing API
|
//testing API
|
||||||
m.deps = function(mock) {return window = mock}
|
m.deps = function(mock) {return window = mock}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue