-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnode-plugin.js
More file actions
33 lines (25 loc) · 967 Bytes
/
node-plugin.js
File metadata and controls
33 lines (25 loc) · 967 Bytes
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
var NodeRunner = require("./node-runner");
var ShellRunner = require("../cloud9.run.shell/shell").Runner;
var assert = require("assert");
module.exports = function setup(options, imports, register) {
var pm = imports["process-manager"];
var sandbox = imports.sandbox;
var vfs = imports.vfs;
var nodePath = options.nodePath || null;
assert(options.listenHint, "Option 'listenHint' is required");
NodeRunner.call(this, options.url, options.listenHint, vfs, pm, sandbox, false, nodePath, function (err) {
if (err) return register(err);
register(null, {
"run-node": {
Runner: NodeRunner.Runner
}
});
});
};
(function() {
this.name = "node";
this.createChild = function(callback) {
this.args = this.nodeArgs.concat(this.file, this.scriptArgs);
ShellRunner.prototype.createChild.call(this, callback);
};
}).call(NodeRunner.Runner.prototype);