Skip to content

Commit f92c743

Browse files
niksydmethvin
authored andcommitted
Build: add UMD support
Fixes #207 Closes #206
1 parent 93c37d1 commit f92c743

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
"test": "grunt test",
2323
"ci": "grunt ci"
2424
},
25+
"dependencies": {
26+
"jquery": "3.0.0"
27+
},
2528
"devDependencies": {
2629
"chalk": "1.1.3",
2730
"commitplease": "2.3.1",

src/intro.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,14 @@
1-
(function( jQuery, window ) {
1+
;(function( factory ) {
2+
/* jshint browserify:true */
3+
if ( typeof define === "function" && define.amd ) {
4+
// AMD. Register as an anonymous module.
5+
define( [ "jquery" ], window, factory );
6+
} else if ( typeof module === "object" && module.exports ) {
7+
// Node/CommonJS
8+
module.exports = factory( require( "jquery" ), window );
9+
} else {
10+
// Browser globals
11+
factory( jQuery, window );
12+
}
13+
}(function( jQuery, window ) {
214
"use strict";

src/outro.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
2-
})( jQuery, window );
1+
return jQuery;
2+
}));

0 commit comments

Comments
 (0)