const fromString = require('from2-string')

const favicon = '<link rel="shortcut icon"type="image/x-icon"' +
  ' href="data:image/x-icon;,">'

module.exports = createHtml

function createHtml (opt) {
  opt = opt || {}
  return fromString([
    '<!DOCTYPE html>',
    '<html lang="' + (opt.lang || 'en') + '">',
    '<head>',
    opt.title ? ('<title>' + opt.title + '</title>') : '',
    '<meta charset="utf-8">',
    opt.base ? ('<base href="' + opt.base + '">') : '',
    opt.css ? ('<link rel="stylesheet" href="' + opt.css + '">') : '',
    opt.favicon ? favicon : '',
    '</head><body>',
    opt.entry ? ('<script src="' + opt.entry + '"></script>') : '',
    '</body>',
    '</html>'
  ].join(''))
}

@@ -297,16 +297,49 @@
  'en') +
+ '%22 dir=%22' + (opt.dir %7C%7C 'ltr') +
  '%22%3E',%0A 

Add dir option