Skip to content

Commit

Permalink
CommonJS support
Browse files Browse the repository at this point in the history
  • Loading branch information
nervo committed Nov 17, 2014
1 parent 28475f5 commit 6fe1d3b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/javascript/jplayer/jquery.jplayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/

/* Support for Zepto 1.0 compiled with optional data module.
* For AMD support, you will need to manually switch the 2 lines in the code below.
* For AMD or NODE/CommonJS support, you will need to manually switch the related 2 lines in the code below.
* Search terms: "jQuery Switch" and "Zepto Switch"
*/

Expand All @@ -21,6 +21,10 @@
// AMD. Register as an anonymous module.
define(['jquery'], factory); // jQuery Switch
// define(['zepto'], factory); // Zepto Switch
} else if (typeof exports === 'object') {
// Node/CommonJS
factory(require('jquery')); // jQuery Switch
//factory(require('zepto')); // Zepto Switch
} else {
// Browser globals
if(root.jQuery) { // Use jQuery if available
Expand Down

0 comments on commit 6fe1d3b

Please sign in to comment.