lib/site_builder.js
function SiteBuilder(config, fileMap) {
  this.config = config;
  this.root = config.root;

  var helperFile = path.join(this.root, '_lib', 'helpers.js');
  if (existsSync(helperFile)) {
    userHelpers = require(helperFile);
  }

  var filterFile = path.join(this.root, '_lib', 'filters.js');
  if (existsSync(filterFile)) {
    userFilters = require(filterFile);
  }

  var postFilterFile = path.join(this.root, '_lib', 'post-filters.js');
  if (existsSync(postFilterFile)) {
    userPostFilters = require(postFilterFile);
  }

  this.outputRoot = config.output;
  this.fileMap = fileMap;
  this.posts = [];
  this.helpers = helpers;
  this.events = new EventEmitter();
  this.includes = {};

  this.loadPlugins();
}
function SiteBuilder(config, fileMap) {
  this.config = config;
  this.root = config.root;

  var helperFile = path.join(this.root, '_lib', 'helpers.js');
  if (existsSync(helperFile)) {
    userHelpers = require(helperFile);
  }

  var filterFile = path.join(this.root, '_lib', 'filters.js');
  if (existsSync(filterFile)) {
    userFilters = require(filterFile);
  }

  var postFilterFile = path.join(this.root, '_lib', 'post-filters.js');
  if (existsSync(postFilterFile)) {
    userPostFilters = require(postFilterFile);
  }

  this.outputRoot = config.output;
  this.fileMap = fileMap;
  this.posts = [];
  this.helpers = helpers;
  this.events = new EventEmitter();
  this.includes = {};

  this.loadPlugins();
}
function SiteBuilder ( config , fileMap ) { this . config = config ; this . root = config . root ; var helperFile = path . join ( this . root , '_lib' , 'helpers.js' ) ; if ( existsSync ( helperFile ) ) { userHelpers = require ( helperFile ) ; } var filterFile = path . join ( this . root , '_lib' , 'filters.js' ) ; if ( existsSync ( filterFile ) ) { userFilters = require ( filterFile ) ; } var postFilterFile = path . join ( this . root , '_lib' , 'post-filters.js' ) ; if ( existsSync ( postFilterFile ) ) { userPostFilters = require ( postFilterFile ) ; } this . outputRoot = config . output ; this . fileMap = fileMap ; this . posts = [ ] ; this . helpers = helpers ; this . events = new EventEmitter ( ) ; this . includes = { } ; this . loadPlugins ( ) ; }
Initialize `SiteBuilder` with a config object and `FileMap`.

@param {Object} Config options
@param {FileMap} A `FileMap` object
@api public
Initialize SiteBuilder with a config object and FileMap .