Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/320294

Change subject: Replacing swig with swig-templates
......................................................................

Replacing swig with swig-templates

Swig is no longer being maintained and swig-templates is a fork.

Also updating to version 2.0.2.

Change-Id: I8d240e867205d5436078b7993593483a95a4a656
---
M package.json
M src/relay.js
2 files changed, 4 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/grrrit 
refs/changes/94/320294/1

diff --git a/package.json b/package.json
index 6960a24..9d1105b 100644
--- a/package.json
+++ b/package.json
@@ -8,7 +8,7 @@
     "irc-colors": "~1.3.0",
     "js-yaml": "^3.4.2",
     "ssh2": "~0.5.1",
-    "swig": "~0.14.0",
+    "swig-templates": "~2.0.2",
     "underscore": "~1.8.3",
     "winston": "~2.1.1"
   },
diff --git a/src/relay.js b/src/relay.js
index e14eba1..40dcbe3 100644
--- a/src/relay.js
+++ b/src/relay.js
@@ -27,12 +27,6 @@
     logging.error(message);
 }
 
-swig.init({
-    filters: require('./colors.js'),
-    autoescape: false,
-    root: __dirname
-});
-
 function subscribeToGerritStream(host, port, username, keypath, listener) {
     logging.info('Connecting to gerrit..');
 
@@ -110,7 +104,9 @@
     return channels.filter(function(v, i) { return channels.indexOf(v) === i; 
});
 }
 
-var template = swig.compileFile('template.txt');
+swig.setFilter('colors', require('./colors.js'));
+swig.setDefaults({ autoescape: false });
+var template = swig.compileFile(__dirname + '/template.txt');
 
 var ircClient = new irc.Client(config.server, config.nick, {
     userName: config.userName,

-- 
To view, visit https://gerrit.wikimedia.org/r/320294
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8d240e867205d5436078b7993593483a95a4a656
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/grrrit
Gerrit-Branch: master
Gerrit-Owner: Paladox <thomasmulhall...@yahoo.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to