0

We've been using the Ruby version of the sass compiler with compass and grunt-contrib-sass for quite a while but it's very slow.

Since libsass is faster than its Ruby pendant, we replaced grunt-contrib-sass with grunt-sass.

Unfortunately, the docs for grunt-contrib-compass say:

This task requires you to have Ruby, Sass, and Compass >=1.0.1 installed

Also, when I run our build, I get:

Running "sass:dist" (sass) task
>> Error: File to import not found or unreadable: compass
>>        Parent style sheet: src/assets/sass/catalog.scss
>>         on line 15 of src/assets/sass/catalog.scss
>> >> @import "compass";
>>    ^
Warning:  Use --force to continue.

So, if grunt-contrib-compass is not compatible with grunt-sass how can I use compass with libsass then?

4

1 回答 1

0

找到了解决方案。就像安装compass-importer一样简单:

$ npm install --save-dev compass-importer

然后importer: compass在 Gruntfile.js 中设置

于 2016-10-15T16:11:03.133 回答