Skip to content

Commit

Permalink
Updates clean-css dependency to version 5.
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubpawlowicz authored and XhmikosR committed Feb 15, 2021
1 parent 83b0c2f commit 5c05f6b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"dependencies": {
"chalk": "^4.1.0",
"clean-css": "~4.2.3",
"clean-css": "~5.0.1",
"maxmin": "^3.0.0"
},
"devDependencies": {
Expand Down
5 changes: 3 additions & 2 deletions tasks/cssmin.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,16 @@ module.exports = function (grunt) {

this.files.forEach(function (file) {
var options = this.options({
rebase: false,
report: 'min',
sourceMap: false
});

var availableFiles = getAvailableFiles(file.src);
var compiled = '';

options.rebaseTo = path.dirname(file.dest);
if (Boolean(options.rebase)) {
options.rebaseTo = path.dirname(file.dest);
}

try {
compiled = new CleanCSS(options).minify(availableFiles);
Expand Down
2 changes: 1 addition & 1 deletion test/expected/rebase.css
Original file line number Diff line number Diff line change
@@ -1 +1 @@
body{background:url(../test/fixtures/test.jpg)}/*# sourceMappingURL=rebase.css.map */
body{background:url('../test/fixtures/test.jpg')}/*# sourceMappingURL=rebase.css.map */

0 comments on commit 5c05f6b

Please sign in to comment.