Skip to content

Commit

Permalink
Replace gulp-cssnano with gulp-postcss
Browse files Browse the repository at this point in the history
  • Loading branch information
jlaunonen committed Jul 21, 2024
1 parent 2b4e218 commit f93aa8c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions kirppu/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ const path = require("path");
const rollup = require("rollup");
const rollup_sucrase = require("@rollup/plugin-sucrase");
const uglify = require("gulp-uglify");
const minify = require("gulp-cssnano");
const minify = require("gulp-postcss");
const cssnano = require("cssnano");

const args = require("minimist")(process.argv.slice(2));
const withColor = (c) => (s) => `\x1b[${ c }m${ s }\x1b[39m`;
Expand Down Expand Up @@ -98,7 +99,7 @@ const cssTasks = Object.entries(pipeline.css).map(function([name, def]) {
return gulp.src(srcPrepend(def))
.pipe(concat(def.output_filename, {process: fileHeader(cssHeader)}))
.on('error', handleError)
.pipe(gif(shouldCompress, minify()))
.pipe(gif(shouldCompress, minify([cssnano()])))
.pipe(gulp.dest(DEST + "/css/"));
});
return taskName;
Expand Down
3 changes: 2 additions & 1 deletion kirppu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@
"dependencies": {
"@rollup/plugin-sucrase": "^4.0.4",
"bootstrap": "^3.4.1",
"cssnano": "^7.0.4",
"dygraphs": "^1.1.1",
"fancy-log": "^2.0.0",
"gulp": "^5.0.0",
"gulp-apply-patch": "^1.0.1",
"gulp-coffee": "^2.3.5",
"gulp-concat-util": "^0.5.5",
"gulp-cssnano": "^2.1.3",
"gulp-if": "^3.0.0",
"gulp-postcss": "10.0.0",
"gulp-uglify": "^3.0.2",
"jquery": "^3.7.1",
"js-cookie": "^3.0.5",
Expand Down

0 comments on commit f93aa8c

Please sign in to comment.