Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
EmacsでScalaのプロジェクトを編集して保存すると発生するバックアップファイルをsbtのcleanタスクで削除するためのbuild.sbtの設定例。
# Add the following line at the first line of build.sbt
import java.io.File
# The following lines may be added at anywhere in build.sbt
def ls(dir:String) : Seq[File] = {
new File(dir).listFiles.flatMap {
case f if f.isDirectory => ls(f.getPath)
case x => List(x)
}
}
cleanFiles ++= ls(".").filter(_.getPath.endsWith("~"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.