forked from nodegit/nodegit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprepareForBuild.js
More file actions
34 lines (29 loc) · 771 Bytes
/
prepareForBuild.js
File metadata and controls
34 lines (29 loc) · 771 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
34
var Promise = require("nodegit-promise");
var cp = require("child_process");
var path = require("path");
var local = path.join.bind(path, __dirname);
var configure = require(local("configureLibssh2"));
var generate = require(local("../generate"));
module.exports = function prepareForBuild() {
return new Promise(function(resolve, reject) {
cp.exec("npm install --ignore-scripts", function(err, stdout, stderr) {
if (err) {
console.error(stderr);
reject(err, stderr);
}
else {
resolve();
console.info(stdout);
}
});
}).then(function() {
return Promise.all([
configure(),
generate()
]);
});
};
// Called on the command line
if (require.main === module) {
module.exports();
}