src/cli.js
async function main({ isFragment, needsHelp, showVersion, useTabs }) {
  /* eslint-disable no-console */
  const stdin = await getStdin()

  if (showVersion) {
    return console.log(version)
  }

  if (needsHelp || !stdin) {
    return console.log(help)
  }

  const pug = html2pug(stdin, { isFragment, useTabs })
  return console.log(pug)

  /* eslint-enable no-console */
}
async function main({ isFragment, needsHelp, showVersion, useTabs }) {
  /* eslint-disable no-console */
  const stdin = await getStdin()

  if (showVersion) {
    return console.log(version)
  }

  if (needsHelp || !stdin) {
    return console.log(help)
  }

  const pug = html2pug(stdin, { isFragment, useTabs })
  return console.log(pug)

  /* eslint-enable no-console */
}
async function main ( { isFragment , needsHelp , showVersion , useTabs } ) { /* eslint-disable no-console */ const stdin = await getStdin ( ) if ( showVersion ) { return console . log ( version ) } if ( needsHelp || ! stdin ) { return console . log ( help ) } const pug = html2pug ( stdin , { isFragment , useTabs } ) return console . log ( pug ) /* eslint-enable no-console */ }
Convert HTML from stdin to Pug
Convert HTML from stdin to Pug