我想在 watchSources 设置中添加一个目录,以便每当我在该目录中保存文件时触发构建任务。
override def baseProject = play.Project(
moduleName,
moduleVersion,
dependencies = libraries,
path = file(location),
settings = moduleSettings ++ Seq(
watchSources <++= baseDirectory map { dir =>
Seq(
dir / "src/main/javascript"
)
}
)
)
我似乎无法解决以下错误:
type mismatch;
[error] found : sbt.Project.Initialize[ScalaObject with Equals]
[error] required: sbt.Project.Initialize[sbt.Task[?]]
[error] Note: ScalaObject with Equals >: sbt.Task[?], but trait Initialize is invariant in type T.
[error] You may wish to define T as -T instead. (SLS 4.5)
[error] watchSources <++= baseDirectory { f =>
[error] ^
[error] one error found
[error] (compile:compile) Compilation failed
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
如何将一系列文件附加到监视源任务的结果?