Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/syarul/html-inject-css

Transform stream for injecting stylesheet tags into html.
https://github.com/syarul/html-inject-css

Last synced: 3 days ago
JSON representation

Transform stream for injecting stylesheet tags into html.

Awesome Lists containing this project

README

        

# html-inject-css

Transform stream for injecting css tags into html.

### example:

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

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

input:
```html
hello
```
output:
```html
hello
```

### cli

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

### Gotcha:
requires a head tag to be present in the src.