Index: node_modules/vulcanize/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/registry-url/node_modules/rc/index.js |
diff --git a/node_modules/vulcanize/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/registry-url/node_modules/rc/index.js b/node_modules/vulcanize/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/registry-url/node_modules/rc/index.js |
new file mode 100755 |
index 0000000000000000000000000000000000000000..3b3e6b40bf299c1f19b8b92601dd82188974a51f |
--- /dev/null |
+++ b/node_modules/vulcanize/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/registry-url/node_modules/rc/index.js |
@@ -0,0 +1,46 @@ |
+#! /usr/bin/env node |
+var cc = require('./lib/utils') |
+var join = require('path').join |
+var deepExtend = require('deep-extend') |
+var etc = '/etc' |
+var win = process.platform === "win32" |
+var home = win |
+ ? process.env.USERPROFILE |
+ : process.env.HOME |
+ |
+module.exports = function (name, defaults, argv) { |
+ if('string' !== typeof name) |
+ throw new Error('rc(name): name *must* be string') |
+ if(!argv) |
+ argv = require('minimist')(process.argv.slice(2)) |
+ defaults = ( |
+ 'string' === typeof defaults |
+ ? cc.json(defaults) : defaults |
+ ) || {} |
+ |
+ var local = cc.find('.'+name+'rc') |
+ |
+ var env = cc.env(name + '_') |
+ |
+ return deepExtend.apply(null, [ |
+ defaults, |
+ win ? {} : cc.json(join(etc, name, 'config')), |
+ win ? {} : cc.json(join(etc, name + 'rc')), |
+ home ? cc.json(join(home, '.config', name, 'config')) : {}, |
+ home ? cc.json(join(home, '.config', name)) : {}, |
+ home ? cc.json(join(home, '.' + name, 'config')) : {}, |
+ home ? cc.json(join(home, '.' + name + 'rc')) : {}, |
+ cc.json(local), |
+ local ? {config: local} : null, |
+ env.config ? cc.json(env.config) : null, |
+ argv.config ? cc.json(argv.config) : null, |
+ env, |
+ argv |
+ ]) |
+} |
+ |
+if(!module.parent) { |
+ console.log( |
+ JSON.stringify(module.exports(process.argv[2]), false, 2) |
+ ) |
+} |