Playframework 更少的sbt在编译时更改我的源文件

Playframework 更少的sbt在编译时更改我的源文件,playframework,less,Playframework,Less,非常简单 我正在使用playframework 2.4.x 我有一个包含以下内容的文件app/assets/stylesheets/main.less: @import "lib/bootstrap/less/bootstrap.less"; // This should not go away! body { background-color: #6600FF; } 当项目重新编译(activator compile或使用~run加载文件)时,该文件将恢复为仅包含导入行的文件:

非常简单

我正在使用playframework 2.4.x

我有一个包含以下内容的文件app/assets/stylesheets/main.less:

@import "lib/bootstrap/less/bootstrap.less";

// This should not go away!


body {
    background-color: #6600FF;
}
当项目重新编译(activator compile或使用~run加载文件)时,该文件将恢复为仅包含导入行的文件:

@import "lib/bootstrap/less/bootstrap.less";
我没有收到错误信息,没有明显的抱怨,只是似乎在默默地失败

我可能做错了什么

我想检查什么设置以确保我没有把事情搞砸

我的第一个假设是用户错误,而不是bug。到目前为止,我的谷歌技能让我失望

build.sbt的内容:

name := """webgame"""

version := "1.0-SNAPSHOT"

lazy val root = (project in file(".")).enablePlugins(PlayJava)

scalaVersion := "2.11.6"

libraryDependencies ++= Seq(
  javaJdbc,
  cache,
  javaWs,
  "org.webjars" % "bootstrap" % "3.3.6",        //Bootstrap
  "mysql" % "mysql-connector-java" % "5.1.38"   //Mysql
)

// Play provides two styles of routers, one expects its actions to be injected, the
// other, legacy style, accesses its actions statically.
routesGenerator := InjectedRoutesGenerator


// The following two lines should automatically add any .less files in app/assets/stylesheets
// to the list of assets to compile, as well as telling it to skip any files that have an
// underscore ("_") at the start of their name.  This should let us use an underscore to designate
// a file to treat as a partial.
//
// A partial is a chunk of code that is put into an individual file for use in other files, like
// an include file or similar.  It is part of the DRY approach to writing reusable code.
//
includeFilter in (Assets, LessKeys.less) := "*.less"
excludeFilter in (Assets, LessKeys.less) := "_*.less"
project/plugins.sbt的内容:

// The Play plugin
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.6")

// Web plugins
addSbtPlugin("com.typesafe.sbt" % "sbt-coffeescript" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.0.6")
addSbtPlugin("com.typesafe.sbt" % "sbt-jshint" % "1.0.3")
addSbtPlugin("com.typesafe.sbt" % "sbt-rjs" % "1.0.7")
addSbtPlugin("com.typesafe.sbt" % "sbt-digest" % "1.1.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-mocha" % "1.1.0")

// Play enhancer - this automatically generates getters/setters for public fields
// and rewrites accessors of these fields to use the getters/setters. Remove this
// plugin if you prefer not to have this feature, or disable on a per project
// basis using disablePlugins(PlayEnhancer) in your build.sbt
addSbtPlugin("com.typesafe.sbt" % "sbt-play-enhancer" % "1.1.0")

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")

由于这似乎是一个构建问题,您可能希望提供您正在使用的SBT插件的详细信息(在
项目/plugins.SBT
中)以及
构建.SBT
的内容。非常感谢。信息添加!