mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-03 12:20:04 +02:00
use minify
This commit is contained in:
16
node_modules/clean-css/lib/clean.js
generated
vendored
16
node_modules/clean-css/lib/clean.js
generated
vendored
@@ -46,6 +46,22 @@ var CleanCSS = module.exports = function CleanCSS(options) {
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
// for compatibility with optimize-css-assets-webpack-plugin
|
||||
CleanCSS.process = function (input, opts) {
|
||||
var cleanCss;
|
||||
var optsTo = opts.to;
|
||||
|
||||
delete opts.to;
|
||||
cleanCss = new CleanCSS(Object.assign({ returnPromise: true, rebaseTo: optsTo }, opts));
|
||||
|
||||
return cleanCss.minify(input)
|
||||
.then(function(output) {
|
||||
return { css: output.styles };
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
CleanCSS.prototype.minify = function (input, maybeSourceMap, maybeCallback) {
|
||||
var options = this.options;
|
||||
|
||||
|
Reference in New Issue
Block a user