Skip to content

replace npmconf with rc #119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions lib/es6/cMake.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let vsDetect = require("./vsDetect");
let TargetOptions = require("./targetOptions");
let processHelpers = require("./processHelpers");
let locateNAN = require("./locateNAN");
let npmconf = Bluebird.promisifyAll(require("npmconf"));
let npmConfigData = require("rc")("npm");
let async = Bluebird.coroutine;
let Toolset = require("./toolset");

Expand Down Expand Up @@ -185,14 +185,7 @@ CMake.prototype.getConfigureCommand = async(function* () {
}

// Load NPM config
let npmConfig = yield npmconf.loadAsync();
let npmConfigData = {};
if (npmConfig.sources.global && npmConfig.sources.global.data) {
_.extend(npmConfigData, npmConfig.sources.global.data);
}
if (npmConfig.sources.user && npmConfig.sources.user.data) {
_.extend(npmConfigData, npmConfig.sources.user.data);
}
npmConfigData = {};
for (let key of _.keys(npmConfigData)) {
let ukey = key.toUpperCase();
if (_.startsWith(ukey, "CMAKE_")) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"is-iojs": "^1.0.1",
"lodash": "^3.6.0",
"memory-stream": "0",
"npmconf": "^2.1.2",
"npmlog": "^1.2.0",
"rc": "^1.2.7",
"request": "^2.54.0",
"semver": "^5.0.3",
"splitargs": "0",
Expand Down