玩萨斯不工作 [英] play sass not working

查看:91
本文介绍了玩萨斯不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已按照 https://github.com/jlitola/play-sass 上的说明进行操作一个>. 我的plugins.sbt读取(最后两行)

I have followed the instructions on https://github.com/jlitola/play-sass. My plugins.sbt reads (for the last two lines)

resolvers += "Sonatype OSS Releases" at "https://oss.sonatype.org/content/repositories/releases"

addSbtPlugin("net.litola" % "play-sass" % "0.3.0")`

对于build.sbt,我较早的时候在最后一行有SassPlugin.sassSettings(与playScalaSettings分开).我现在将其更改为

For build.sbt, I earlier had SassPlugin.sassSettings on the last line (separate from playScalaSettings). I've changed it now to

net.litola.SassPlugin.sassSettings + play.Project.playScalaSettings

但是,我仍然无法使它工作:-).我的文件位于

However, I still can't get this to work :-). My files are in

app/assets/first.scss

app/assets/stylesheets/second.scss

app/assets/styles/third.scss

app/assets/style/fourth.scss

(完全不同,以便我知道哪个有效),但是,我看不到任何结果的CSS. scss和sass在命令行中可以正常工作.

( delibrerately different so that I know which one works), however, I don't see any resulting css. scss and sass work fine from command line.

在游戏中可以识别出plugins.sbt和build.sbt的变化,因为当我有意添加错字时,用SassPlugin.sassSetting代替SassPlugin.sassSettings时,play reload update给我一个错误,该错误在我修复错字时得以解决背部.有人知道我在做什么错吗?

Looks like changes in plugins.sbt and build.sbt are recognized by play because when I intentionally add a typo, SassPlugin.sassSetting in place of SassPlugin.sassSettings, play reload update gives me an error which fixes when I fix the typo back. Would someone know what I'm doing wrong?

我在play2.2 btw上.

I'm on play2.2 btw.

推荐答案

你好,一些观察.

1)结构: 将您的sass文件保持在以下结构中

1) Structure: Keep your sass files in the following structure

app/assets/stylesheets/first.scsc
app/assets/stylesheets/second.scsc
app/assets/stylesheets/third.scsc
app/assets/stylesheets/forth.scsc

2)build.sbt 如下所示,将代码保持在单独的行上,并且它们之间至少要有一个行距.

2) build.sbt keep the code on separate lines with at least once line space in between as shown bellow.

play.Project.playScalaSettings

net.litola.SassPlugin.sassSettings

3)plugins.sbt很好.

3) plugins.sbt is fine.

这篇关于玩萨斯不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆