1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00
raspap-webgui/node_modules/gulp-uglify/composer.js
2018-03-09 02:03:53 +00:00

18 lines
419 B
JavaScript

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