function buildDocs(globPattern, opts, cb) {
  var DocWrapper = require('../src/layouts/doc-wrapper')
  parseDocs(globPattern, opts, function(err, docs) { // eslint-disable-line handle-callback-err
    var navData = docs.map(function(doc) {
      return {
        title: doc.attributes.title,
        relative: doc.relative,
      }
    })
    console.log('navdata', navData) // eslint-disable-line no-console

    async.each(docs, function(doc, cb) {
      fs.readFile(doc.src, 'utf8')
      var props = {
        title: doc.attributes.title,
        contents: doc.body,
        navData: navData,
      }
      var html = React.renderToStaticMarkup(React.createElement(DocWrapper, props))
      writeFile(path.join(OUT, doc.relative), html, cb)
    }, cb)
  })
}
@param {glob} globPattern
@param {Object} opts
@param {String} opts.cwd
@param {Function} cb