3
我正在嘗試使用sass-maven-plugin,它有一個useCompass選項。我想將圖像放在目錄中,但是我無法讓目錄被「看到」。我不斷收到的錯誤是說,加載路徑匹配圖標/ *。PNG沒有找到任何文件。請參閱下面的完整錯誤。Sprite generation with Compass and SASS maven plugin missing load path
注:如果我從命令行使用羅盤編譯運行它,它的工作原理。但是,運行它與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"
config.rb的內容是什麼? – cimmanon
我創建了一個config.rb文件,並且能夠讀取它的內容,但是它仍然存在問題。我將嘗試使用該路徑來找出它的相對位置。 – zmanc
@zmanc你能解釋一下你是如何構建它的? – qkrijger