From 4b21e00adc6fae42e6a88deaeb0b7c077c6ca50e Mon Sep 17 00:00:00 2001 From: dcodeIO Date: Thu, 2 Mar 2017 20:12:26 +0100 Subject: [PATCH] Other: Moved cli deps placeholder creation to post install script [ci skip] --- cli/node_modules/placeholder | 0 scripts/postinstall.js | 7 +++++-- 2 files changed, 5 insertions(+), 2 deletions(-) delete mode 100644 cli/node_modules/placeholder diff --git a/cli/node_modules/placeholder b/cli/node_modules/placeholder deleted file mode 100644 index e69de29bb..000000000 diff --git a/scripts/postinstall.js b/scripts/postinstall.js index 759eea69c..148915a3e 100644 --- a/scripts/postinstall.js +++ b/scripts/postinstall.js @@ -1,11 +1,14 @@ var path = require("path"), + fs = require("fs"), pkg = require(path.join(__dirname, "..", "package.json")); +// ensure that there is a node_modules folder for cli dependencies +try { fs.mkdirSync(path.join(__dirname, "..", "cli", "node_modules")); } catch (e) {/**/} + +// check version scheme used by dependents if (!pkg.versionScheme) return; -var fs = require("fs"); - var warn = process.stderr.isTTY ? "\x1b[30m\x1b[43mWARN\x1b[0m \x1b[35m" + path.basename(process.argv[1], ".js") + "\x1b[0m" : "WARN " + path.basename(process.argv[1], ".js");