Answer the question
In order to leave comments, you need to log in
Why error from cleanCSS in gulp?
Here is the gulp config:
const { src, dest } = require('gulp')
const plumber = require('gulp-plumber')
const sass = require('gulp-sass')
const autoprefixer = require('gulp-autoprefixer')
const sassGlob = require('gulp-sass-glob')
const cleanCSS = require('gulp-clean-css')
function styles () {
return src('#src/static/styles/styles.scss')
.pipe(plumber())
.pipe(sassGlob())
.pipe(sass({outputStyle: 'expanded'}))
.pipe(cleanCSS())
.pipe(autoprefixer())
.pipe(dest('dist/css'))
}
exports.styles = styles
Ignoring local @import of "#src/static/styles/styles.css" as resource is missing.
a {
display: flex;
align-items: center;
}
.shorthand {
font-style: italic;
font-weight: bold;
font-size: .8em;
line-height: 1.2;
font-family: Arial, sans-serif;
}
Answer the question
In order to leave comments, you need to log in
Faced the same problem when setting up gulp according to this video tutorial. This is a bug because of the "#" character. Something breaks in the plugin when using it. Rename the #src folder to src, and don't forget to make the same change to the sourceFolder variable. IMHO, all these "own developments" are doubtful. I sat for two hours looking for what the problem was.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question