Skip to content
master
Go to file
Code
This branch is 27 commits ahead, 10 commits behind colorhook:master.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

smosh Build Status

A middleware between resmushit and streams on top of vinyl.

How to use?

npm install smosh --save
var smosh = require('smosh'),
    file  = smosh(vinylFile),
    data  = '';

file.on('data', function(chunk) {
    // file chunk stream
    data += chunk;
});

file.on('end', function(newBuffer, info) {
    // vinyl metadata if previously given
    console.log(newBuffer.toString());
    // or if data is streamed
    console.log(data);
    // percentage compressed
    console.log(info.percent)
});

file.on('error', function(err) {
    throw err;
});

License

MIT © Helder Santana

Based on: node-smushit

About

A middleware between resmushit and streams on top of vinyl.

Resources

Packages

No packages published
You can’t perform that action at this time.