ソースを参照

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