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

    1

    Version

    1.3.0

    License

    MIT

    Last publish

    Collaborators

    • anandthakker