css - gulp-uncss error: unable to parse: -
having problem running gulp-uncss rid of unused code. mistake seems parsing of css.
c:\wamp64\www\css-cleanup\node_modules\gulp-uncss\node_modules\uncss\node_modules\bluebird\js\release\async.js:48 fn = function () { throw arg; }; ^ error: uncss/node_modules/css: unable parse undefined: missing '{' near line 34:1 29: @import "components/_navbar"; 30: @import "components/_slick"; 31: @import "components/_slick-theme"; 32: @import "components/_slack"; 33: //@import "components/_landing"; 34: -> @ error (c:\wamp64\www\css-cleanup\node_modules\gulp-uncss\node_modules\uncss\node_modules\css\node_modules\css-parse\index.js:57:15) @ declarations (c:\wamp64\www\css-cleanup\node_modules\gulp-uncss\node_modules\uncss\node_modules\css\node_modules\css-parse\index.js:214:25) @ rule (c:\wamp64\www\css-cleanup\node_modules\gulp-uncss\node_modules\uncss\node_modules\css\node_modules\css-parse\index.js:481:21) @ rules (c:\wamp64\www\css-cleanup\node_modules\gulp-uncss\node_modules\uncss\node_modules\css\node_modules\css-parse\index.js:103:56) @ stylesheet (c:\wamp64\www\css-cleanup\node_modules\gulp-uncss\node_modules\uncss\node_modules\css\node_modules\css-parse\index.js:73:16) @ object.module.exports [as parse] (c:\wamp64\www\css-cleanup\node_modules\gulp-uncss\node_modules\uncss\node_modules\css\node_modules\css-parse\index.js:485:10) @ process (c:\wamp64\www\css-cleanup\node_modules\gulp-uncss\node_modules\uncss\src\uncss.js:158:22) @ trycatcher (c:\wamp64\www\css-cleanup\node_modules\gulp-uncss\node_modules\uncss\node_modules\bluebird\js\release\util.js:11:23) @ promise._settlepromisefromhandler (c:\wamp64\www\css-cleanup\node_modules\gulp-uncss\node_modules\uncss\node_modules\bluebird\js\release\promise.js:488:35) @ promise._settlepromise (c:\wamp64\www\css-cleanup\node_modules\gulp-uncss\node_modules\uncss\node_modules\bluebird\js\release\promise.js:548:18) @ promise._settlepromise0 (c:\wamp64\www\css-cleanup\node_modules\gulp-uncss\node_modules\uncss\node_modules\bluebird\js\release\promise.js:593:10) @ promise._settlepromises (c:\wamp64\www\css-cleanup\node_modules\gulp-uncss\node_modules\uncss\node_modules\bluebird\js\release\promise.js:676:18) @ promise._fulfill (c:\wamp64\www\css-cleanup\node_modules\gulp-uncss\node_modules\uncss\node_modules\bluebird\js\release\promise.js:617:18) @ promisearray._resolve (c:\wamp64\www\css-cleanup\node_modules\gulp-uncss\node_modules\uncss\node_modules\bluebird\js\release\promise_array.js:125:19) @ promisearray._promisefulfilled (c:\wamp64\www\css-cleanup\node_modules\gulp-uncss\node_modules\uncss\node_modules\bluebird\js\release\promise_array.js:143:14) @ promise._settlepromise (c:\wamp64\www\css-cleanup\node_modules\gulp-uncss\node_modules\uncss\node_modules\bluebird\js\release\promise.js:553:26)
my gulpfile.js looks this:
var gulp = require('gulp'); var uncss = require('gulp-uncss'); gulp.task('default', function () { return gulp.src('sass/**/*.scss') .pipe(uncss({ html: ['index.html'] })) .pipe(gulp.dest('./css_new/')); });
Comments
Post a Comment