mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
902281294f
support for a browser sync task as well for easier development
18 lines
419 B
JavaScript
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);
|
|
}
|
|
});
|
|
};
|
|
};
|