lib/pop.js
function generateSite(config, useServer) {
  var fileMap = new FileMap(config)
    , siteBuilder = new SiteBuilder(config)
    , server = require(__dirname + '/server')(siteBuilder);

  fileMap.walk();
  fileMap.on('ready', function() {
    siteBuilder.fileMap = fileMap;
    siteBuilder.build();
  });

  siteBuilder.once('ready', function() {
    if (useServer) {
      server.run();
      server.watch();
    }
  });

  return siteBuilder;
}
function generateSite(config, useServer) {
  var fileMap = new FileMap(config)
    , siteBuilder = new SiteBuilder(config)
    , server = require(__dirname + '/server')(siteBuilder);

  fileMap.walk();
  fileMap.on('ready', function() {
    siteBuilder.fileMap = fileMap;
    siteBuilder.build();
  });

  siteBuilder.once('ready', function() {
    if (useServer) {
      server.run();
      server.watch();
    }
  });

  return siteBuilder;
}
function generateSite ( config , useServer ) { var fileMap = new FileMap ( config ) , siteBuilder = new SiteBuilder ( config ) , server = require ( __dirname + '/server' ) ( siteBuilder ) ; fileMap . walk ( ) ; fileMap . on ( 'ready' , function ( ) { siteBuilder . fileMap = fileMap ; siteBuilder . build ( ) ; } ) ; siteBuilder . once ( 'ready' , function ( ) { if ( useServer ) { server . run ( ) ; server . watch ( ) ; } } ) ; return siteBuilder ; }
Runs `FileMap` and `SiteBuilder` based on the config.

@params {Object} Configuration options
@params {Boolean} Use a HTTP sever?
@return {SiteBuilder} A `SiteBuilder` instance
Runs FileMap and SiteBuilder based on the config .