Package: node-xterm / 2.7.0+ds1-1

workaround-browserify-lite.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Description: Work around browserify-lite not being as smart as browserify
 This gets undone in the end result, see d/rules
Author: Ximin Luo <infinity0@debian.org>
Forwarded: not-needed
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: node-xterm/src/xterm.js
===================================================================
--- node-xterm.orig/src/xterm.js
+++ node-xterm/src/xterm.js
@@ -729,10 +729,10 @@ Terminal.prototype.open = function(paren
 Terminal.loadAddon = function(addon, callback) {
   if (typeof exports === 'object' && typeof module === 'object') {
     // CommonJS
-    return require('./addons/' + addon + '/' + addon);
+    return REQUIRE_NO_BROWSERIFY('./addons/' + addon + '/' + addon);
   } else if (typeof define == 'function') {
     // RequireJS
-    return require(['./addons/' + addon + '/' + addon], callback);
+    return REQUIRE_NO_BROWSERIFY(['./addons/' + addon + '/' + addon], callback);
   } else {
     console.error('Cannot load a module without a CommonJS or RequireJS environment.');
     return false;