2015-05-13 92 views
0

在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'] 
       }, 

当我跑我的呼噜声任务,出现此错误:

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 line 9:

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

为什么不指南针找到任何图像?

回答

1

只要改变你的进口

@import "icons/*.png"; 

您当前的负载路径(指南针)已经指出:app/styles/sprites/