Answer the question
In order to leave comments, you need to log in
Why did Prettier format JS strings differently?
There is the following function for Gulp, in this form it is formatted by Prettier
function CSS() {
return gulp
.src("./src/style/style.scss")
.pipe(sourcemaps.init())
.pipe(
sass({
errLogToConsole: true,
outputStyle: argv.prod ? "compressed" : "expanded",
includePaths: ["node_modules"],
}).on("error", sass.logError),
)
.pipe(
argv.prod
? autoPrefixer({
cascade: true,
overrideBrowserslist: ["last 3 versions"],
})
: emptyStream(),
)
.pipe(argv.prod ? csso() : emptyStream())
.pipe(sourcemaps.write("."))
.pipe(
argv.prod ? gulp.dest("./build/style/") : gulpMem.dest("./build/style/"),
)
.pipe(browserSync.stream());
}
{
"useTabs": true,
"bracketSameLine": true,
"trailingComma": "all",
"singleQuote": false,
"semi": true,
"quoteProps": "as-needed",
"proseWrap": "never",
"endOfLine": "auto"
}
.pipe(
argv.prod ? gulp.dest("./build/style/") : gulpMem.dest("./build/style/"),
)
.pipe(argv.prod ? csso() : emptyStream())
"trailingComma": "es5"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question