Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

style-stream

1.3.0 • Public • Published

style-stream

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

Usage

style-stream http://npmjs.org/package/example

or

curl http://github.com/iojs | style-stream http://github.com
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

var fs = require('fs'),
    styles = require('style-stream');
 
fs.createReadStream(__dirname + '/index.html')
.pipe(styles({basepath: __dirname}))
.pipe(process.stdout);

install

npm i style-stream

Downloadsweekly downloads

20

version

1.3.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar