Open
Description
Currently the functions minifyCSS
and minifyJS
cannot perform any asynchronous calls. It would be a really nice enhancement to add callback support.
Example of possible new syntax
var minify = require('html-minifier').minify;
var html = '<html><head><style>body { margin: 0; display: flex; }</style></head></html>';
var result = minify(html, {
minifyCSS: function(css, callback) {
doSomethingAsync(css, function(updatedCss) {
callback(updatedCss);
});
}
});
This enhancement can be added without any changes to the way synchronous code is executed.
Related: #900
Metadata
Metadata
Assignees
Labels
No labels