Compass 找不到我创建精灵的图像

Compass can't find my images for creating sprites

在Gruntfile.js中:

compass: {
  options: {
    sassDir: '<%= yeoman.app %>/styles',
    cssDir: '.tmp/styles',
    generatedImagesDir: '.tmp/images/generated',
    imagesDir: '<%= yeoman.app %>/images',
    javascriptsDir: '<%= yeoman.app %>/scripts',
    fontsDir: '<%= yeoman.app %>/styles/fonts',
    importPath: '<%= yeoman.app %>/bower_components',
    httpImagesPath: '../images',
    httpGeneratedImagesPath: '../images/generated',
    httpFontsPath: '/styles/fonts',
    spriteLoadPath: '<%= yeoman.app %>/styles/sprites/',
    relativeAssets: true,
    assetCacheBuster: false
  },
  dist: {
    options: {
      generatedImagesDir: '<%= yeoman.dist %>/images/generated'
    }
  },
  server: {
    options: {
      debugInfo: false
    }
  }
},

这是任务:

 compass: {
              files: ['<%= yeoman.app %>/styles/{,*/}*.{scss,sass}'],
              tasks: ['compass:server', 'autoprefixer']
              },

当我 运行 我的 g运行t 任务时,得到这个错误:

error app/styles/main.scss (Line 9: No files were found in the load path matching "app/styles/sprites/icons/*.png". Your current load paths are: app/styles/sprites/, /Volumes/myuser/Documents/Projects/mysite/app/images)

main.scss 第 9 行:

@import "app/styles/sprites/icons/*.png";

为什么 Compass 找不到任何图像?

只需将导入更改为

@import "icons/*.png";

您当前的加载路径(在罗盘中)已指向:app/styles/sprites/