Browse Source

支持require引入

newraina 9 năm trước cách đây
mục cha
commit
95b4c9b7df
3 tập tin đã thay đổi với 8 bổ sung0 xóa
  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);

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 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);

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác