code: function initConfig(sitePathOrConfig) {
    [
      // Check exact path
      sitePathOrConfig + '.js',
      path.join(sitePathOrConfig, 'config.js'),
      sitePathOrConfig,
  
      // Check under the working directory
      path.join(process.cwd(), sitePathOrConfig + '.js'),
      path.join(process.cwd(), sitePathOrConfig, 'config.js'),
      path.join(process.cwd(), sitePathOrConfig),
  
      // Check under the directory where gulp was started
      path.join(process.env.INIT_CWD, sitePathOrConfig + '.js'),
      path.join(process.env.INIT_CWD, sitePathOrConfig, 'config.js'),
      path.join(process.env.INIT_CWD, sitePathOrConfig),
    ]
    .some(function(configFile) {
      var stat;
      try {
        stat = fs.lstatSync(configFile);
      } catch(err) {}
      if ( stat && stat.isFile() ) {
        gutil.log('Using configuration in ', configFile);
        siteConfig = require(path.resolve(configFile));
        siteConfig.configFile = configFile;
        siteConfig.rootPath = path.dirname(siteConfig.configFile);
        return true;
      }
    });
    if ( !siteConfig || !siteConfig.paths ) {
      gutil.log('Invalid site configuration in ', sitePathOrConfig);
      process.exit(1);
    }
  }
docs: Build Configuration