# su - docker $ ~/bin/activator new Getting com.typesafe.activator activator-launcher 1.2.2 ... ... Choose from these featured templates or enter a template name: 1) minimal-java 2) minimal-scala 3) play-java 4) play-scala (hit tab to see a list of all templates) > 2 Enter a name for your application (just press enter for'minimal-scala') > OK, application "minimal-scala" is being created using the "minimal-scala" template.
To run "minimal-scala" from the command line, "cd minimal-scala"then: /home/docker/minimal-scala/activator run
To run the testfor"minimal-scala" from the command line, "cd minimal-scala"then: /home/docker/minimal-scala/activator test
To run the Activator UI for"minimal-scala" from the command line, "cd minimal-scala"then: /home/docker/minimal-scala/activator ui
minimal-scala
作成したminimal-scalaのプロジェクトをtreeで確認します。
$ tree minimal-scala/ minimal-scala/ ├── LICENSE ├── activator ├── activator-launch-1.2.2.jar ├── activator.bat ├── build.sbt ├── project │ └── build.properties └── src ├── main │ └── scala │ └── com │ └── example │ └── Hello.scala └── test └── scala └── HelloSpec.scala
$ cd minimal-scala/ $ ./activator run Getting org.scala-sbt sbt 0.13.5 ... ... [info] Running com.example.Hello Hello, world! [success] Total time: 26 s, completed 2014/06/28 14:30:27
Scala REPL
ScalaのREPLも、activatorで実行できます。
$ ./activator console [info] Loading project definition from /home/docker/minimal-scala/project [info] Set current project to minimal-scala (in build file:/home/docker/minimal-scala/) [info] Starting scala interpreter... [info] Welcome to Scala version 2.11.1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_05). Type in expressions to have them evaluated. Type :helpfor more information.