function buildPages(pagesGlob, opts, cb) {
  var cwd = path.join(process.cwd(), opts.cwd)
  console.log('buildPages, cwd=%s', cwd) // eslint-disable-line no-console

  glob(pagesGlob, opts, function(err, files) { // eslint-disable-line handle-callback-err
    async.each(files, function(item, cb) {
      var componentPath = path.relative(__dirname, path.join(cwd, item))
      var destFilepath = changeExtension(path.join(OUT, item), '.html')

      var Component = require(componentPath)
      var html = React.renderToStaticMarkup(React.createElement(Component))

      writeFile(destFilepath, html, cb)
    }, cb)
  })
}
/*.md', { cwd: 'src/' }),
    ], done)
  })
}

/**
@param {glob} pagesGlob
@param {Object} opts
@param {String} opts.cwd
@param {Function} cb