3

useCompass オプションを持つ sass-maven-plugin を使用しようとしています。ディレクトリに画像をスプライトしたいのですが、ディレクトリを「見る」ことができません。私が取得し続けるエラーは、icons/*.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"
4

1 に答える 1

0

これは実際にはコンパスのバグでした。@scottdavis This Comittによる次のコミットで修正されました

于 2013-09-06T17:04:15.540 に答える