src/interface/_utils.js
function extendConf(conf, f) {
      if (_.isArray(conf.extends)) {
        async.reduce(conf.extends, conf, function(res, filePath, cb) {
          loadCheckbuildConf(filePath, function(err, conf) {
            /**
             * Do almost like _.defaultsDeep, but without merging arrays
             */
            function defaultsDeep(config, defaults) {
              if (_.isPlainObject(config)) {
                return _.mapValues(_.defaults(config, defaults), function(val, index) {
                  return defaultsDeep(_.get(config, index), _.get(defaults, index));
                });
              }

              return config || defaults;
            }

            cb(err, defaultsDeep(res, conf));
          });
        }, f);
      } else {
        f(null, conf);
      }
    }
function extendConf(conf, f) {
      if (_.isArray(conf.extends)) {
        async.reduce(conf.extends, conf, function(res, filePath, cb) {
          loadCheckbuildConf(filePath, function(err, conf) {
            /**
             * Do almost like _.defaultsDeep, but without merging arrays
             */
            function defaultsDeep(config, defaults) {
              if (_.isPlainObject(config)) {
                return _.mapValues(_.defaults(config, defaults), function(val, index) {
                  return defaultsDeep(_.get(config, index), _.get(defaults, index));
                });
              }

              return config || defaults;
            }

            cb(err, defaultsDeep(res, conf));
          });
        }, f);
      } else {
        f(null, conf);
      }
    }
function extendConf ( conf , f ) { if ( _ . isArray ( conf . extends ) ) { async . reduce ( conf . extends , conf , function ( res , filePath , cb ) { loadCheckbuildConf ( filePath , function ( err , conf ) { /**
             * Do almost like _.defaultsDeep, but without merging arrays
             */ function defaultsDeep ( config , defaults ) { if ( _ . isPlainObject ( config ) ) { return _ . mapValues ( _ . defaults ( config , defaults ) , function ( val , index ) { return defaultsDeep ( _ . get ( config , index ) , _ . get ( defaults , index ) ) ; } ) ; } return config || defaults ; } cb ( err , defaultsDeep ( res , conf ) ) ; } ) ; } , f ) ; } else { f ( null , conf ) ; } }
Load and apply extends
Load and apply extends