async function getDocument(filepath, options = {}) {
  const {rebase = {}, base} = options;

  if (!isVinyl(filepath) && !isRemote(filepath) && !fs.existsSync(filepath) && base) {
    filepath = joinPath(base, filepath);
  }

  const document = await vinylize({filepath}, options);

  document.stylesheets = await getStylesheetHrefs(document, options);
  document.stylesheetsMedia = await getStylesheetsMedia(document, options);
  document.virtualPath = rebase.to || (await getDocumentPath(document, options));

  document.cwd = base || process.cwd();
  if (!base && document.path) {
    document.cwd = document.path.replace(document.virtualPath, '');
  }

  debug('(getDocument) Result: ', {
    path: document.path,
    url: document.url,
    remote: Boolean(document.remote),
    virtualPath: document.virtualPath,
    stylesheets: document.stylesheets,
    cwd: document.cwd,
  });

  document.css = await getCss(document, options);

  const [url, cleanup] = await preparePenthouseData(document);
  document.url = url;
  document.cleanup = cleanup;

  return document;
}
Get document file object
@param {string} filepath Path/Url to html file
@param {object} options Critical options
@returns {Promise<Vinyl>} Vinyl representation of HTML document