使用Compass和SASS maven插件的精灵生成缺少加载路径

时间:2013-07-03 14:53:35

标签: css maven sass sprite compass-sass

我正在尝试使用带有useCompass选项的sass-maven-plugin。我想在一个目录中spriteing图像,但是我无法得到目录" see"。我不断得到的错误是说匹配图标/ * .png的加载路径没有找到任何文件。请参阅下面的完整错误。

注意:如果我只是使用指南针编译从命令行运行它,它可以工作。然而,使用maven目标运行它我仍然得到错误。

pom.xml
|-src
 |-main
   |-scss
     |-styleguide
          -styleguide.scss
     |-images
       |-icons
          -my.png

的pom.xml

<plugin>
    <groupId>org.jasig.maven</groupId>
    <artifactId>sass-maven-plugin</artifactId>
    <executions>
        <execution>
            <id>sassProcessResources</id>
            <phase>generate-resources</phase>
            <goals>
                <goal>update-stylesheets</goal>
            </goals>
            <configuration>
                <useCompass>true</useCompass>
                <sassSourceDirectory>${basedir}/src/main/scss</sassSourceDirectory>
                <destination>${project.build.outputDirectory}/styleguide-components/resources/css</destination>
            </configuration>
        </execution>
    </executions>
</plugin>

scss文件

@import "icons/*.png";

错误

Compilation of template C:/code/DiscoveryStyleGuide/styleguide/src/main/scss/styleguide/sprite/Sprite.scss failed: No files were found in the load path matching "icons/*.png". Your current load paths are: ./images

config.rb

# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "compiled"
sass_dir = "/"
images_dir = "images"
# javascripts_dir = "javascripts"

1 个答案:

答案 0 :(得分:0)

这实际上是指南针中的一个错误。它由@scottdavis This Comitt

通过以下提交修复
相关问题