Browse Source

支持require引入

newraina 9 years ago
parent
commit
95b4c9b7df
3 changed files with 8 additions and 0 deletions
  1. 4 0
      dist/meplayer.js
  2. 0 0
      dist/meplayer.min.js
  3. 4 0
      src/js/main.js

+ 4 - 0
dist/meplayer.js

@@ -271,6 +271,10 @@
 	    }
 	};
 
+	if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
+	    module.exports = root.mePlayer;
+	}
+
 	function getTarget(option) {
 	    if (typeof option === 'string') {
 	        return document.querySelector(option);

File diff suppressed because it is too large
+ 0 - 0
dist/meplayer.min.js


+ 4 - 0
src/js/main.js

@@ -231,6 +231,10 @@ root.mePlayer = function (options) {
     }
 };
 
+if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
+    module.exports = root.mePlayer;
+}
+
 function getTarget(option) {
     if (typeof option === 'string') {
         return document.querySelector(option);

Some files were not shown because too many files changed in this diff