Created
September 8, 2019 04:02
-
-
Save pandanote-info/82291d4e23b4671b7ceeb38324c8edf8 to your computer and use it in GitHub Desktop.
EmacsでScalaのプロジェクトを編集して保存すると発生するバックアップファイルをsbtのcleanタスクで削除するためのbuild.sbtの設定例。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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