Browse Source

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

Brad Metcalf 9 years ago
parent
commit
81d4bb1060
2 changed files with 2 additions and 8 deletions
  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
     // CommonJS module is defined
     if (typeof module !== 'undefined' && module.exports) {
     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
     // AMD module is defined
     else if (typeof define === "function" && define.amd) {
     else if (typeof define === "function" && define.amd) {

File diff suppressed because it is too large
+ 1 - 1
dist/js/bootstrap-dialog.min.js