浏览代码

Allowed use of require() and Electron now uses it in the CommonJS env

Brad Metcalf 9 年之前
父节点
当前提交
81d4bb1060
共有 2 个文件被更改,包括 2 次插入8 次删除
  1. 1 7
      dist/js/bootstrap-dialog.js
  2. 1 1
      dist/js/bootstrap-dialog.min.js

+ 1 - 7
dist/js/bootstrap-dialog.js

@@ -17,13 +17,7 @@
 
     // CommonJS module is defined
     if (typeof module !== 'undefined' && module.exports) {
-        var isNode = (typeof process === "object") && (typeof process.versions === "object");
-        var isElectron = isNode && ('electron' in process.versions);
-        if (isElectron) {
-            root.BootstrapDialog = factory(root.jQuery);
-        } else {
-            module.exports = factory(require('jquery'), require('bootstrap'));
-        }
+        module.exports = factory(require('jquery'), require('bootstrap'));
     }
     // AMD module is defined
     else if (typeof define === "function" && define.amd) {

文件差异内容过多而无法显示
+ 1 - 1
dist/js/bootstrap-dialog.min.js