Skip to content

Commit 4b21e00

Browse files
committed
Other: Moved cli deps placeholder creation to post install script [ci skip]
1 parent 483c5e2 commit 4b21e00

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

cli/node_modules/placeholder

Whitespace-only changes.

scripts/postinstall.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
var path = require("path"),
2+
fs = require("fs"),
23
pkg = require(path.join(__dirname, "..", "package.json"));
34

5+
// ensure that there is a node_modules folder for cli dependencies
6+
try { fs.mkdirSync(path.join(__dirname, "..", "cli", "node_modules")); } catch (e) {/**/}
7+
8+
// check version scheme used by dependents
49
if (!pkg.versionScheme)
510
return;
611

7-
var fs = require("fs");
8-
912
var warn = process.stderr.isTTY
1013
? "\x1b[30m\x1b[43mWARN\x1b[0m \x1b[35m" + path.basename(process.argv[1], ".js") + "\x1b[0m"
1114
: "WARN " + path.basename(process.argv[1], ".js");

0 commit comments

Comments
 (0)