From c307b302f749f59c24fdd483acb32480571194b2 Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Sun, 14 May 2017 11:58:13 -0400 Subject: [PATCH] doc: blorb about setting `npm_config_OPTION_NAME` PR-URL: https://github.com/nodejs/node-gyp/pull/1185 Fixes: https://github.com/nodejs/node-gyp/issues/1180 Reviewed-By: Ben Noordhuis Reviewed-By: Gibson Fahnestock Reviewed-By: Richard Lau Reviewed-By: Anna Henningsen --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index d5443080dd..03db320900 100644 --- a/README.md +++ b/README.md @@ -192,6 +192,23 @@ Command Options | `--solution=$solution` | Set Visual Studio Solution version (win) +Configuration +-------- + +__`node-gyp` responds to environment variables or `npm` configuration__ +1. Environment variables take the form `npm_config_OPTION_NAME` for any of the + options listed above (dashes in option names should be replaced by underscores). + These work also when `node-gyp` is invoked directly: + `$ export npm_config_devdir=/tmp/.gyp` + or on Windows + `> set npm_config_devdir=c:\temp\.gyp` +2. As `npm` configuration, variables take the form `OPTION_NAME`. + This way only works when `node-gyp` is executed by `npm`: + `$ npm config set [--global] devdir /tmp/.gyp` + `$ npm i buffertools` + + + License -------