Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/syarul/html-inject-css
- Owner: syarul
- License: mit
- Created: 2017-09-14T09:18:17.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-14T17:22:34.000Z (about 7 years ago)
- Last Synced: 2024-11-01T15:47:53.765Z (11 days ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.