-
Notifications
You must be signed in to change notification settings - Fork 1
Open
@LukasRos
Description
I've encountered an issue wherein I'm trying to purge a (third-party) CSS file and I'm getting the following error:
CSS Parser Error: probably have something funny in your CSS, change it then please try again.
Reason: missing '}'
Line: 157
Column: 1
Filename: demo/test1.css
There is no missing } in the line mentioned nor anywhere else in the file as far as I'm aware. The filename is also not demo/test1.css
.
Here is my Gulp code:
const gulp = require('gulp'); const concat = require('gulp-concat'); const streamqueue = require('streamqueue'); const cssPurge = require('gulp-css-purge'); // Concatenate and minify stylesheets gulp.task('styles', function() { // inspired by https://stackoverflow.com/a/23507836 return streamqueue({ objectMode: true }, gulp.src('./node_modules/purecss/build/pure.css'), gulp.src('./static/app.css'), gulp.src('./node_modules/codemirror/lib/codemirror.css'), ) .pipe(concat('styles.css')) .pipe(cssPurge({ trim : true, shorten : true, verbose : false })) .pipe(gulp.dest('./static')); });
The problem is with the ./node_modules/codemirror/lib/codemirror.css
file because when I comment this line I can purge the other two without issues. The problem is also not with concatenation or the use of streamqueue because even without it I get the same error.
Now, the following run from CLI works without any problem and produces a valid minified CSS file:
./node_modules/.bin/css-purge -i ./node_modules/codemirror/lib/codemirror.css
Therefore I assume there's a problem in this package and not in css-purge itself.
Metadata
Metadata
Assignees
Labels
No labels