diff options
author | Florian Dold <florian.dold@gmail.com> | 2018-09-20 02:56:13 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2018-09-20 02:56:13 +0200 |
commit | bbff7403fbf46f9ad92240ac213df8d30ef31b64 (patch) | |
tree | c58400ec5124da1c7d56b01aea83309f80a56c3b /node_modules/clean-css/lib/clean.js | |
parent | 003fb34971cf63466184351b4db5f7c67df4f444 (diff) |
update packages
Diffstat (limited to 'node_modules/clean-css/lib/clean.js')
-rw-r--r-- | node_modules/clean-css/lib/clean.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/node_modules/clean-css/lib/clean.js b/node_modules/clean-css/lib/clean.js index 62308efec..8cdb4b793 100644 --- a/node_modules/clean-css/lib/clean.js +++ b/node_modules/clean-css/lib/clean.js @@ -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; |