Skip to content

Commit 3f575aa

Browse files
author
Jason Moon
committed
Merge pull request #37 from devongovett/master
Add CommonJS support
2 parents 1c1f58d + 1115b01 commit 3f575aa

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

jQuery.XDomainRequest.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
if (typeof define === 'function' && define.amd) {
99
// AMD. Register as anonymous module.
1010
define(['jquery'], factory);
11+
} else if (typeof exports === 'object') {
12+
// CommonJS
13+
module.exports = factory(require('jquery'));
1114
} else {
1215
// Browser globals.
1316
factory(jQuery);
@@ -111,4 +114,4 @@ $.ajaxTransport('* text html xml json', function(options, userOptions, jqXHR) {
111114
};
112115
});
113116

114-
}));
117+
}));

package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "jquery-xdomainrequest",
3+
"version": "1.0.2",
4+
"description": "jQuery ajaxTransport extension that uses XDomainRequest for IE8+",
5+
"dependencies": {
6+
"jquery": ">=1.5.0"
7+
},
8+
"main": "jQuery.XDomainRequest.js"
9+
}

0 commit comments

Comments
 (0)