docs: function initComponentDir (config, absDir, file) {
      // get name from camel-case file
      var name = changeCase.camelCase(file)
      // map of files in directory
      var files = {}
      // read all files
      _.each(fs.readdirSync(absDir), file => {
          files[file] = false
      })
      // component specification
      var component = {name: name}
      // map of files to be required and the property they map to
      var requireFiles = {
          [`${file}.client.js`]: 'client',
          [`${file}.server.js`]: 'server',
      }
      // require files
      _.each(requireFiles, (property, file) => {
          // skip if file does not exist
          if (!defined(files[file])) {
              return
          }
          // require file and set as property for component
          component[property] = require(
              path.relative(__dirname, `${absDir}/${file}`)
          )
          // set flag true once file read
          files[file] = true
      })
      // map of files to load and the property they map to
      var loadFiles = {
          [`${file}.css`]: 'css',
          [`${file}.hbs`]: 'template',
          [`${file}.js`]: 'js',
      }
      // load files
      _.each(loadFiles, (property, file) => {
          // skip if file does not exist
          if (!defined(files[file])) {
              return
          }
          // require file and set as property for component
          component[property] = fs.readFileSync(`${absDir}/${file}`, {
              encoding: 'utf8'
          })
          // set flag true once file read
          files[file] = true
      })
      // load partials if directory exists
      if (defined(files['partials'])) {
          // create partials entry in config
          component.partials = {}
          // get abs path of partials dir
          var partialsDir = `${absDir}/partials`
          // load each file in partials dir
          _.each(fs.readdirSync(partialsDir), file => {
              // get absolute path of file
              var absFile = `${partialsDir}/${file}`
              // partial must have hbs extension
              if (file.match(/\.hbs$/)) {
                  // use file name for partial name
                  var name = changeCase.camelCase(file.replace(/\.hbs$/, ''))
                  // load file
                  component.partials[name] = fs.readFileSync(absFile, {
                      encoding: 'utf8'
                  })
              }
              else {
                  debug('initComponentDir: ignoring %s', absFile)
              }
          })
          // set flag true once file read
          files['partials'] = true
      }
      // load helpers if directory exists
      if (defined(files['helpers'])) {
          // create helpers entry in config
          component.helpers = {}
          // get abs path of helpers dir
          var helpersDir = `${absDir}/helpers`
          // load each file in partials dir
          _.each(fs.readdirSync(helpersDir), file => {
              // get absolute path of file
              var absFile = `${helpersDir}/${file}`
              // helpers must have hbs extension
              if (file.match(/\.js$/)) {
                  // require file
                  var helper = require(path.relative(__dirname, absFile))
                  // helper is single function
                  if (typeof helper === 'function') {
                      // use file name for helper name
                      var name = changeCase.camelCase(file.replace(/\.hbs$/, ''))
                      // set helper for component
                      component.helpers[name] = helper
                  }
                  // otherwise helper should be object keyed by name
                  else {
                      _.merge(component.helpers, helper)
                  }
              }
              else {
                  debug('initComponentDir: ignoring %s', absFile)
              }
          })
          // set flag true once file read
          files['helpers'] = true
      }
      // if component is already defined merge this data over original spec
      if (defined(config.components[name])) {
          _.merge(config.components[name], component)
      }
      // otherwise defined new component
      else {
          config.components[name] = component
      }
  }