html-inject-vdom

0.0.1 • Public • Published

html-inject-vdom

Transform stream for injecting virtual DOM tags into html.

example:

var injectVdom = require('html-inject-vdom')
 
process.stdin
.pipe( injectVdom(['app', 'tabs']) )
.pipe( process.stdout )

input:

<html><head></head><body>hello</body></html>

output:

<html><head></head><body><div id="app"></div><div id="tabs"></div>hello</body></html>

cli

cat index.html | htmlinjectvdom "app" > output.html

Gotcha:

requires a head tag to be present in the src.

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i html-inject-vdom

    Weekly Downloads

    1

    Version

    0.0.1

    License

    MIT

    Last publish

    Collaborators

    • syarul