stream
Closed this issue · 3 comments
Deleted user commented
can we pipe stream to minify ?
coderaiser commented
Deleted user commented
I am looking for something like
myFileStream.pipe(minify).pipe(storeInCache)
My goal is the cache manager automaticaly store minified files in ram if environment is production.
coderaiser commented
Unfortunately uglify
and html-minifier
which are used in minify
doesn't support streams. They load file completely and then process it.
About loading to ram
, stream doesn't works this way. You can just process files with minify
and store results in variables or something:
minify('client.js', function(error, data) {
if (error)
console.error(error.message);
else
console.log(data);
});