Execute npm install after installing a plugin

pull/64/head
Ruben Daniels 2015-04-01 02:15:02 +00:00 zatwierdzone przez nightwing
rodzic 943b890cf6
commit 4e9c87f80b
2 zmienionych plików z 22 dodań i 4 usunięć

Wyświetl plik

@ -66,7 +66,7 @@
"c9.ide.find.infiles": "#1b83cf12f1",
"c9.ide.find.replace": "#e4daf722b8",
"c9.ide.run.debug": "#638e6b00b3",
"c9.automate": "#7e2612a88c",
"c9.automate": "#86bf1ee1ca",
"c9.ide.ace.emmet": "#e5f1a92ac3",
"c9.ide.ace.gotoline": "#4d1a93172c",
"c9.ide.ace.keymaps": "#6c4bb65b1f",

Wyświetl plik

@ -741,9 +741,27 @@ define(function(require, exports, module) {
? new Error("Failed to unpack package")
: null;
// Done
callback(err, {
version: version
proc.spawn(join(process.env.HOME, ".c9/node/bin/npm"), {
args: ["install"],
cwd: packagePath
}, function(err, p){
if (err) return callback(err);
if (verbose) {
p.stdout.on("data", function(c){
process.stdout.write(c.toString("utf8"));
});
p.stderr.on("data", function(c){
process.stderr.write(c.toString("utf8"));
});
}
p.on("exit", function(code){
// Done
callback(err, {
version: version
});
});
});
});
});