function normalizeOptions({ path, quiet, overlay, reload, name }) {
  const shouldLog = !quiet;
  const options = {
    path,
    overlay: true,
    reload: false,
    name: '',
    logger: {
      shouldLog,
      log(...args) {
        if (shouldLog) {
          console.log(...args);
        }
      },
      warn(...args) {
        if (shouldLog) {
          console.warn(...args);
        }
      },
      error(...args) {
        if (shouldLog) {
          console.error(...args);
        }
      },
    },
  };

  if (overlay) {
    options.overlay = overlay !== 'false';
  }
  if (reload) {
    options.reload = reload !== 'false';
  }
  if (name) {
    options.name = name;
  }
  return options;
}