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