Gulp can't seem to find compass mixins

前端 未结 3 955
说谎
说谎 2021-01-16 01:37

I am trying out gulp as an alternative build tool to Grunt, to compile my scss to css, as I have heard it can be much faster.

I having problems doing even a basic co

3条回答
  •  旧时难觅i
    2021-01-16 01:58

    You right, compass should be installed globally on your system to get this work, at least easily. I recommend you to uninstall sass and compass to get something clean using

    gem uninstall sass && gem uninstall compass
    

    And then re-install them with :

    gem install sass
    gem install compass --pre
    

    And after you can define a gulp task like so

    gulp.task('compass', function () {
    
      return gulp.src('../sass/UK/screen.scss')
        .pipe(sass({ compass: true, sourcemap: true, style: 'compressed' }))
        .pipe(gulp.dest('../css/UK/screen.css'));
    
    });
    

提交回复
热议问题