Rev | Line | |
---|
[483] | 1 | /* |
---|
| 2 | * Test module for dojo/node plugin that tries to detect AMD |
---|
| 3 | */ |
---|
| 4 | |
---|
| 5 | (function(undefined){ |
---|
| 6 | |
---|
| 7 | var nodeamd = {}; |
---|
| 8 | |
---|
| 9 | nodeamd.test = 'foo'; |
---|
| 10 | |
---|
| 11 | // "Improper" detection of AMD in a combined CommonJS/AMD modules, where the module thinks it is being loaded |
---|
| 12 | // by an AMD loader, when in fact it could be being loaded by a CommonJS module loader. The dojo/node plugin |
---|
| 13 | // needs to "hide" define from these types of modules. |
---|
| 14 | if (typeof define === "function" && define.amd) { |
---|
| 15 | define("nodeamd", [], function () { |
---|
| 16 | return nodeamd; |
---|
| 17 | }); |
---|
| 18 | } |
---|
| 19 | else if (typeof module !== 'undefined' && module.exports) { |
---|
| 20 | module.exports = nodeamd; |
---|
| 21 | } |
---|
| 22 | else if (typeof ender === 'undefined') { |
---|
| 23 | this['nodeamd'] = nodeamd; |
---|
| 24 | } |
---|
| 25 | |
---|
| 26 | }).call(this); |
---|
Note: See
TracBrowser
for help on using the repository browser.