GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — nodegit/lifecycleScripts/preinstall.js at master · nodegit/nodegit

Expand file tree

/

preinstall.js

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
executable file
·
47 lines (42 loc) · 1.22 KB
/

preinstall.js

Copy path

File metadata and controls

executable file
·
47 lines (42 loc) · 1.22 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
35
36
37
38
39
40
41
42
43
44
45
46
47
var path = require("path");
var local = path.join.bind(path, __dirname);
var exec = require(local("../utils/execPromise"));
var buildFlags = require(local("../utils/buildFlags"));
module.exports = function prepareForBuild() {
console.log("[nodegit] Running pre-install script");
return exec("npm -v")
.then(
function(npmVersion) {
if (npmVersion.split(".")[0] < 3) {
console.log(
"[nodegit] npm@2 installed, pre-loading required packages"
);
return exec("npm install --ignore-scripts");
}
return Promise.resolve();
},
function() {
// We're installing via yarn, so don't
// care about compability with npm@2
}
)
.then(function() {
if (buildFlags.isGitRepo) {
var submodules = require(local("submodules"));
var generate = require(local("../generate"));
return submodules()
.then(function() {
return generate();
});
}
});
};
// Called on the command line
if (require.main === module) {
module.exports()
.catch(function(e) {
console.error("[nodegit] ERROR - Could not finish preinstall");
console.error(e);
process.exit(1);
});
}
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.