3

我正在尝试使用具有 useCompass 选项的 sass-maven-plugin。我想在一个目录中精灵图像,但是我不能让目录被“看到”。我不断收到的错误是说加载路径匹配 icons/*.png 没有找到任何文件。有关完整错误,请参见下文。

注意:如果我只使用 compass compile 从命令行运行它,它就可以工作。但是以 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

配置文件

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

1 回答 1

0

这实际上是指南针中的一个错误。通过@scottdavis This Comitt的以下提交修复了它

于 2013-09-06T17:04:15.540 回答