ディレクトリにファイルを保存するたびにビルド タスクをトリガーするように、watchedSources 設定にディレクトリを追加したいと考えています。
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?
監視対象ソース タスクの結果に一連のファイルを追加するにはどうすればよいですか?