create-html
Version:
create the content of an html file with one function call
19 lines (14 loc) • 432 B
JavaScript
var fs = require('fs')
var markdown = require('markdown-stream')
var fromString = require('from2-string')
var hyperstream = require('hyperstream')
var createHTML = require('./index')
var html = createHTML({
title: 'example'
})
var readmeStream = fs.createReadStream('README.md').pipe(markdown('full'))
var hs = hyperstream({
'body': readmeStream
})
var htmlStream = fromString(html)
htmlStream.pipe(hs).pipe(process.stdout)