node package manager
Loosely couple your services. Use Orgs to version and reuse your code. Create a free org »

style-stream

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);