async function getDocumentFromSource(html, options = {}) {
  const {rebase = {}, base} = options;
  const document = await vinylize({html}, options);

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

  debug('(getDocumentFromSource) 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 from raw html source
@param {string} html HTML source
@param {object} options Critical options
@returns {Promise<*>} Vinyl representation of HTML document