Support clean-css v4
ngyikp opened this issue · 4 comments
@lukeapage: how do you want to handle the upgrade? IMO we should remove advanced etc and keep clean-css's O1 defaults.
@XhmikosR
Just chiming in here: imho, ideally you'll want to detect the version in use for CleanCSS and switch on that, continuing support for the old API as people may be stuck using the 3.x branch for some reason or other.
While afaict CleanCSS doesn't have a version
member on its exported object, you can still grab it from the package.json
file. Very easy to do, actually:
var cleanCssVersion = require("clean-css/package.json").version;
For the CLI options in v4, you can probably directly copy a large part of the argument parsing logic from the clean-css-cli
package as well.
Well, all this is nice and all, but 1) this repo has no tests and 2) I don't want to make so many changes myself. So we need someone to submit a working PR for the current clean-css version and if/when there is a bump we decide how to proceed with old versions.
Upgrading would also fix #26.