gpt4 book ai didi

coffeescript - 在 SBT 设置中将目录附加到 watch-sources

转载 作者:行者123 更新时间:2023-12-04 04:45:21 25 4
gpt4 key购买 nike

我想在 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?

如何将文件序列附加到监视源任务的结果中?

最佳答案

      watchSources <++= baseDirectory map { path => ((path / "src/main/webapp/coffee") ** "*.coffee").get }

关于coffeescript - 在 SBT 设置中将目录附加到 watch-sources,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17276312/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com