Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions composer.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ 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) {
return through.obj(async function(file, encoding, callback) {
var newFile = null;
var err = null;
try {
newFile = minifier(file);
newFile = await minifier(file);
} catch (e) {
err = e;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/minify.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = function(uglify, log) {
}

return function(opts) {
return function(file) {
return async function(file) {
var options = setup(opts || {});
var hasSourceMaps = Boolean(file.sourceMap);

Expand Down Expand Up @@ -50,7 +50,7 @@ module.exports = function(uglify, log) {
var fileMap = {};
fileMap[file.relative] = String(file.contents);

var mangled = uglify.minify(fileMap, options);
var mangled = await uglify.minify(fileMap, options);

if (!mangled || mangled.error) {
throw createError(
Expand Down