docs: function getComponentsJson(logger, callback) {
      var deferred = Q.defer(),
          env = process.env.NODE_ENV || 'default',
          configDir = path.join(process.cwd(), 'config'),
          result,
          filePath;
  
      /*eslint-disable no-console*/
      logger = logger ? logger : {
          debug: function () {
              console.log.apply(console, arguments);
          },
          warn: function () {
              console.warn.apply(console, arguments);
          },
          error: function () {
              console.error.apply(console, arguments);
          }
      };
      /*eslint-enable no-console*/
  
      try {
          filePath = path.join(configDir, 'components.' + env + '.js');
          result = requireUncached(filePath);
          deferred.resolve(result);
      } catch (e) {
          if (e.code !== 'MODULE_NOT_FOUND') {
              logger.error('Failed to load components.' + env + '.js', e, 'Falling back on components.json');
          }
  
          logger.debug('Did not find component settings at', filePath, '(proceeding with fallbacks see issue #1335)');
          filePath = path.join(configDir, 'components.json');
  
          Q.nfcall(fs.readFile, filePath, 'utf8')
              .then(function (content) {
                  logger.debug('Found components.json at', filePath);
                  deferred.resolve(JSON.parse(content));
              })
              .catch(function (err) {
                  if (err.code === 'ENOENT') {
                      logger.debug('Returning empty object since also did not find ', filePath);
                      deferred.resolve({});
                  } else {
                      deferred.reject(err);
                  }
              });
      }
  
      return deferred.promise.nodeify(callback);
  }