Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cf2cd8f

Browse filesBrowse files
committed
fix linting in lifecyclescripts
1 parent 20c6566 commit cf2cd8f
Copy full SHA for cf2cd8f

File tree

Expand file treeCollapse file tree

5 files changed

+37
-29
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

5 files changed

+37
-29
lines changed
Open diff view settings
Collapse file

‎lifecycleScripts/checkPrepared.js‎

Copy file name to clipboardExpand all lines: lifecycleScripts/checkPrepared.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function checkVendor(name, skipVersion) {
4545
var vendorPath = "vendor/" + name + "/" + version;
4646
return checkExists(vendorPath);
4747
}
48-
module.exports.checkVendor = checkVendor
48+
module.exports.checkVendor = checkVendor;
4949

5050
function checkGenerated() {
5151
return Promise.all([
Collapse file

‎lifecycleScripts/clean.js‎

Copy file name to clipboardExpand all lines: lifecycleScripts/clean.js
+5-4Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
var fse = require("fs-extra");
22
var path = require("path");
3-
var cp = require("child_process");
43
var npm = require("npm");
54
var Promise = require("nodegit-promise");
65

76
var rooted = path.join.bind(path, __dirname, "..");
87
if (fse.existsSync(rooted(".didntcomefromthenpmregistry"))) {
9-
console.error("[nodegit] We only clean when downloaded from the npm registry. Skipping clean.");
8+
console.error("[nodegit] We only clean when downloaded from the npm " +
9+
"registry. Skipping clean.");
1010
return;
1111
}
1212

@@ -86,10 +86,11 @@ npm.load({
8686
var failures = filesToDelete.some(function(deletable) {
8787
try {
8888
fse.removeSync(rooted(deletable));
89-
return false
89+
return false;
9090
}
9191
catch (e) {
92-
console.info("[nodegit] Error deleting files. Errored on " + rooted(deletable)) + ".";
92+
console.info("[nodegit] Error deleting files. Errored on " +
93+
rooted(deletable) + ".");
9394
console.error(e);
9495

9596
reject(e);
Collapse file

‎lifecycleScripts/install.js‎

Copy file name to clipboardExpand all lines: lifecycleScripts/install.js
+11-10Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ var path = require("path");
44
var fs = require("fs");
55

66
var local = path.join.bind(path, __dirname);
7-
var pkg = require(local("../package"));
8-
var cp = require("child_process");
97

108
var checkPrepared = require(local("checkPrepared"));
119
var forNodeWebkit = require("for-node-webkit");
@@ -42,23 +40,26 @@ return forNodeWebkit(local(".."))
4240
console.info("[nodegit] Completed installation successfully.");
4341
},
4442
function() {
45-
console.info("[nodegit] Failed to install prebuilt binary, building manually.");
43+
console.info("[nodegit] Failed to install prebuilt binary, " +
44+
"building manually.");
4645
return checkAndBuild();
4746
}
4847
);
4948
});
5049

5150

5251
function checkAndBuild(nwVersion) {
53-
console.info("[nodegit] Making sure dependencies are available and native code is generated");
52+
console.info("[nodegit] Making sure dependencies are available and native " +
53+
"code is generated");
5454

5555
return checkPrepared.checkAll()
5656
.then(function(allGood) {
5757
if (allGood) {
5858
return Promise.resolve();
5959
}
6060
else {
61-
console.info("[nodegit] Something is missing, retrieving dependencies and regenerating code");
61+
console.info("[nodegit] Something is missing, retrieving " +
62+
"dependencies and regenerating code");
6263
return prepareForBuild();
6364
}
6465
})
@@ -84,11 +85,11 @@ function build(nwVersion) {
8485
var builder = nwVersion ? "nw-gyp" : "node-gyp";
8586
var target = (nwVersion ? "--target=\"" + nwVersion + "\"": "");
8687
var debug = (process.env.BUILD_DEBUG ? " --debug" : "");
87-
var cmd = path.resolve(".", "node_modules", ".bin", builder)
88-
+ " clean configure"
89-
+ debug
90-
+ target
91-
+ " build";
88+
var cmd = path.resolve(".", "node_modules", ".bin", builder) +
89+
" clean configure" +
90+
debug +
91+
target +
92+
" build";
9293

9394
return exec(cmd, opts)
9495
.then(function() {
Collapse file

‎lifecycleScripts/prepareForBuild.js‎

Copy file name to clipboardExpand all lines: lifecycleScripts/prepareForBuild.js
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module.exports = function prepareForBuild() {
2020
resolve();
2121
console.info(stdout);
2222
}
23-
})
23+
});
2424
}).then(function() {
2525
return Promise.all([
2626
retrieve(),
@@ -37,7 +37,8 @@ function doGenerate() {
3737
return Promise.resolve();
3838
}
3939
else {
40-
console.info("[nodegit] Generated code is missing or incomplete, regenerating now.");
40+
console.info("[nodegit] Generated code is missing or incomplete, " +
41+
"regenerating now.");
4142

4243
return new Promise(function(resolve, reject) {
4344
try {
@@ -51,7 +52,7 @@ function doGenerate() {
5152
//console.info(stderr);
5253
reject(e);
5354
}
54-
})
55+
});
5556
}
5657
});
5758
}
Collapse file

‎lifecycleScripts/retrieveExternalDependencies.js‎

Copy file name to clipboardExpand all lines: lifecycleScripts/retrieveExternalDependencies.js
+16-11Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module.exports = function retrieveExternalDependencies() {
2222
getVendorLib("libgit2"),
2323
getVendorLib("libssh2"),
2424
getVendorLib("http_parser")
25-
])
25+
]);
2626
};
2727

2828

@@ -78,24 +78,29 @@ function getVendorLib(name) {
7878
if ((name == "libssh2") && (process.platform !== "win32")) {
7979
return new Promise(function(resolve, reject) {
8080
console.info("[nodegit] Configuring libssh2.");
81-
cp.exec(rooted(vendorPath) + "configure", {cwd: rooted(vendorPath)}, function(err, stdout, stderr) {
82-
if (err) {
83-
console.error(err);
84-
console.error(stderr);
85-
reject(err, stderr);
81+
cp.exec(
82+
rooted(vendorPath) + "configure",
83+
{cwd: rooted(vendorPath)},
84+
function(err, stdout, stderr) {
85+
if (err) {
86+
console.error(err);
87+
console.error(stderr);
88+
reject(err, stderr);
89+
}
90+
else {
91+
resolve(stdout);
92+
}
8693
}
87-
else {
88-
resolve(stdout);
89-
}
90-
})
94+
);
9195
});
9296
}
9397
else {
9498
return Promise.resolve();
9599
}
96100
})
97101
.then(function() {
98-
console.info("[nodegit] Successfully updated " + vendorPath + version + ".");
102+
console.info("[nodegit] Successfully updated " + vendorPath +
103+
version + ".");
99104
});
100105
}
101106
});

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.