mirror of
https://github.com/penpot/penpot.git
synced 2025-05-10 06:26:38 +02:00
feat(frontend): improve scss build for production
This commit is contained in:
parent
5fdcae4196
commit
7c1168e797
3 changed files with 42 additions and 5 deletions
|
@ -6,6 +6,7 @@ const mustache = require("gulp-mustache");
|
|||
const rename = require("gulp-rename");
|
||||
const gulpif = require("gulp-if");
|
||||
const gzip = require("gulp-gzip");
|
||||
const cleancss = require("gulp-clean-css");
|
||||
|
||||
const paths = {};
|
||||
paths.app = "./resources/";
|
||||
|
@ -54,10 +55,14 @@ function scssPipeline(options) {
|
|||
const output = options.output;
|
||||
|
||||
return gulp.src(input)
|
||||
// .pipe(plumber())
|
||||
.pipe(scss({style: "expanded"}))
|
||||
.pipe(scss({
|
||||
style: "expanded",
|
||||
errLogToConsole: false
|
||||
}).on("error", (err) => {
|
||||
console.log(err.messageFormatted);
|
||||
}))
|
||||
.pipe(makeAutoprefixer())
|
||||
// .pipe(gulpif(isProduction, cssmin()))
|
||||
.pipe(gulpif(isProduction, cleancss()))
|
||||
.pipe(gulp.dest(output));
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue