forked from alexanderGugel/ied
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.js
20 lines (16 loc) · 867 Bytes
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
'use strict'
var path = require('path')
var isWindows = process.platform === 'win32'
var home = process.env[isWindows ? 'USERPROFILE' : 'HOME']
var config = {
registry: process.env.IED_REGISTRY || 'https://registry.npmjs.org/',
cacheDir: process.env.IED_CACHE_DIR || path.join(home, '.ied_cache'),
globalNodeModules: process.env.IED_GLOBAL_NODE_MODULES || path.join(home, '.node_modules'),
globalBin: process.env.IED_GLOBAL_BIN || path.resolve(process.execPath, '..'),
httpProxy: process.env.IED_HTTP_PROXY || process.env.HTTP_PROXY || null,
httpsProxy: process.env.IED_HTTPS_PROXY || process.env.HTTPS_PROXY || null,
requestRetries: 5,
sh: process.env.IED_SH || (process.platform === 'win32' ? process.env.comspec || 'cmd' : 'sh'),
shFlag: process.env.IED_SH_FLAG || (process.platform === 'win32' ? '/d /s /c' : '-c')
}
module.exports = config