用Sunt SASS编译基础ASSS文件 我已用凉亭安装了基础5。通过罗盘表< /代码>编译基础文件没有问题,但是当我想使用咕噜SASS插件时,我看到这个错误: Running "sass:development" (sass) task Warning: C:\wamp\www\nik\myapp/scss/app.scss:2: error: file to import not found or unreadable: "foundation" Use --force to continue. Aborted due to warnings.

用Sunt SASS编译基础ASSS文件 我已用凉亭安装了基础5。通过罗盘表< /代码>编译基础文件没有问题,但是当我想使用咕噜SASS插件时,我看到这个错误: Running "sass:development" (sass) task Warning: C:\wamp\www\nik\myapp/scss/app.scss:2: error: file to import not found or unreadable: "foundation" Use --force to continue. Aborted due to warnings.,sass,gruntjs,zurb-foundation,Sass,Gruntjs,Zurb Foundation,app.scss的第2行是@import“foundation”。 和Grunfile.js中的grunt sass: sass: { development: { options: { outputStyle: 'nested' }, files: { '.css/development/style.css': ['scss/app.scss', 'scss/style.

app.scss的第2行是
@import“foundation”
。 和Grunfile.js中的grunt sass:

sass: {
      development: {
          options: {
              outputStyle: 'nested'
          },
          files: {
            '.css/development/style.css': ['scss/app.scss', 'scss/style.scss']
          }
      },
      production: {
          options: {
              outputStyle: 'compressed'
          },
          files: {
            '.css/development/style.css': ['scss/app.scss', 'scss/style.scss']
          }
      } 

我也进行了测试,但没有影响。

< P> >添加<强> >代码> Labsass <强> >在命令行中安装基础,将导致安装基为<强>兼容Grutt>:

foundation new A_PROJECT_NAME --libsass
随后在grunt中(安装
grunt sass
后):


提示:您可以在app.scss最后一行中导入自己的style.scss。

问题已解决。当使用Grutt编译基础SCSS文件时,我们应该使用LIbsASS来安装基础。代码>基金会新项目名称--libsass您可以添加更多细节吗(也许也可以作为问题的答案?)@streetlight answer added。
sass: {
  development: {
      options: {
          outputStyle: 'nested', 
          // Adding foundation source files, so we can @import them.
          includePaths: ['bower_components/foundation/scss']
      },
      files: {
        'css/style.css': ['path/to/styles/app.scss']
      }
  }
}