每当我的源文件之一发生更改时,如何连续编译和运行我的 Scala 代码?
为此使用 sbt 工具。
# install sbt with homebrew
brew install sbt
# - create a new scala project
# - name your project name when asked like: hello-world
sbt new sbt/scala-seed.g8
# go to the new project directory that you named
cd hello-world
# run sbt to open the sbt shell
sbt
# run your project in continuous running mode
~ run
# to continuously see the test outputs
# open up a new terminal tab, run sbt, and in sbt shell, type:
~ test
这将大大简化您的编辑-编译-运行周期。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句