1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00

18 lines
419 B
JavaScript
Raw Normal View History

'use strict';
var through = require('through2');
var minify = require('./lib/minify');
module.exports = function(uglify, logger) {
return function(opts) {
var minifier = minify(uglify, logger)(opts);
return through.obj(function(file, encoding, callback) {
try {
var newFile = minifier(file);
callback(null, newFile);
} catch (err) {
callback(err);
}
});
};
};