# style-stream

> Transform stream that reads HTML and writes all (inline and referenced) CSS used in it.

Latest version **1.3.0** (published 2015-11-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install style-stream
pnpm add style-stream
yarn add style-stream
bun add style-stream
```

Provides the command `style-stream`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2015-11-27 |
| First published | 2014-12-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Anand Thakker |
| Maintainers | anandthakker |
| Keywords | html, css, streaming, transform, styles |

## Links

- npm: https://www.npmjs.com/package/style-stream
- Repository: https://github.com/anandthakker/style-stream
- Issues: https://github.com/anandthakker/style-stream/issues
- npm.io page: https://npm.io/package/style-stream

## Dependencies (7)

- [request](https://npm.io/package/request.md) ^2.51.0
- [trumpet](https://npm.io/package/trumpet.md) ^1.7.0
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [through2](https://npm.io/package/through2.md) ^0.6.3
- [duplexer2](https://npm.io/package/duplexer2.md) 0.0.2
- [JSONStream](https://npm.io/package/JSONStream.md) ^1.0.7
- [next-stream](https://npm.io/package/next-stream.md) ^2.0.0

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.3.0 (latest) — 2015-11-27
- 1.2.0 — 2015-11-27
- 1.1.5 — 2015-11-27
- 1.1.4 — 2015-02-22
- 1.1.3 — 2014-12-23
- 1.1.2 — 2014-12-21
- 1.1.1 — 2014-12-18
- 1.1.0 — 2014-12-17
- 1.0.1 — 2014-12-17
- 1.0.0 — 2014-12-16

## README

style-stream
============

Transform stream that reads HTML and writes all (inline and referenced) CSS used in it.


# Usage

```bash
style-stream http://npmjs.org/package/example
```
or

```
curl http://github.com/iojs | style-stream http://github.com
```

```javascript
var request = require('request'),
    styles = require('style-stream');
    
styles({url: 'http://npmjs.org/package/example'}))
  .pipe(process.stdout);
    
// or

request('http://npmjs.org/package/example')
.pipe(styles({baseurl: 'http://npmjs.org/package/example'}))
.pipe(process.stdout);

```

or

```javascript
var fs = require('fs'),
    styles = require('style-stream');

fs.createReadStream(__dirname + '/index.html')
.pipe(styles({basepath: __dirname}))
.pipe(process.stdout);
```

---
_Source: https://npm.io/package/style-stream · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
