function _performNpmInstall(installDirectory, npmOptions, callback) {
    var npmPath = path.resolve(path.dirname(require.resolve("npm")), "..", "bin", "npm-cli.js");
    var args = [npmPath, "install"].concat(npmOptions);

    console.log("running npm " + args.slice(1).join(" ") + " in " + installDirectory);

    var child = spawn(process.execPath, args, { cwd: installDirectory });

    child.on("error", function (err) {
        return callback(err);
    });

    var stdout = [];
    child.stdout.addListener("data", function (buffer) {
        stdout.push(buffer);
    });

    var stderr = [];
    child.stderr.addListener("data", function (buffer) {
        stderr.push(buffer);
    });

    var exitCode = 0;
    child.addListener("exit", function (code) {
        exitCode = code;
    });

    child.addListener("close", function () {
        stderr = Buffer.concat(stderr).toString();
        stdout = Buffer.concat(stdout).toString();
        if (exitCode > 0) {
            console.error("npm-stderr: " + stderr);
            return callback(new Error(stderr));
        }
        if (stderr) {
            console.warn("npm-stderr: " + stderr);
        }
        console.log("npm-stdout: " + stdout);
        return callback();
    });

    child.stdin.end();
}
Private function to run "npm install --production" command in the extension directory.

@param {string} installDirectory Directory to remove
@param {array} npmOptions can contain additional options like `--production` or `--proxy http://127.0.0.1:8888`
@param {function} callback NodeJS style callback to call after finish