MCPcopy
hub / github.com/bower/bower / readCachedConfig

Function readCachedConfig

lib/config.js:14–48  ·  view source on GitHub ↗
(cwd, overwrites)

Source from the content-addressed store, hash-verified

12}
13
14function readCachedConfig(cwd, overwrites) {
15 current = bowerConfig.create(cwd).load(overwrites);
16
17 var config = current.toObject();
18
19 var configstore = new Configstore('bower-github').all;
20
21 object.mixIn(config, configstore);
22
23 // If interactive is auto (null), guess its value
24 if (config.interactive == null) {
25 config.interactive =
26 process.bin === 'bower' && tty.isatty(1) && !process.env.CI;
27 }
28
29 // Merge common CLI options into the config
30 if (process.bin === 'bower') {
31 var cli = require('./util/cli');
32
33 object.mixIn(
34 config,
35 cli.readOptions({
36 force: { type: Boolean, shorthand: 'f' },
37 offline: { type: Boolean, shorthand: 'o' },
38 verbose: { type: Boolean, shorthand: 'V' },
39 quiet: { type: Boolean, shorthand: 'q' },
40 loglevel: { type: String, shorthand: 'l' },
41 json: { type: Boolean, shorthand: 'j' },
42 silent: { type: Boolean, shorthand: 's' }
43 })
44 );
45 }
46
47 return config;
48}
49
50function restoreConfig() {
51 if (current) {

Callers 1

defaultConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…