-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
33 lines (26 loc) · 828 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
if (typeof define !== 'function') {
var define = require('amdefine')(module);
}
define(['child_process'], function(child_process){
var mixin = {
//called when first mixing in the functionality
init: function(cfg, callback){
var self = this;
var errs = false;
for(var key in cfg){
self.set(key, cfg[key]);
}
var exec = child_process.exec;
exec('deluge-console info',function (error, stdout, stderr) {
console.log(stdout);
});
if(callback){
callback(errs, self);
}
},
//called when something is published to this channel
publish: function(topic, data){
}
};
return mixin;
});