0.0.3 • Published 7 years ago

html-inject-css v0.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

html-inject-css

Transform stream for injecting css tags into html.

example:

var injectCss = require('html-inject-css')

process.stdin
.pipe( injectCss(['./main.css', './extra.css']) )
.pipe( process.stdout )

input:

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

output:

<html><head><link href="./main.css" rel=stylesheet><link href="./extra.css" rel=stylesheet></head><body>hello</body></html>

cli

cat index.html | htmlinjectcss "main.css" > output.html

Gotcha:

requires a head tag to be present in the src.

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago