Giter8 is a command line tool to generate files and directories from templates published on github or any other git repository. It's implemented in Scala and runs through the Simple Build Tool launcher, but it can produce output for any purpose.
g8コマンドでsbt系のテンプレートをclone出来るやつ。
というか、そもそもsbtって単体ではいい感じにテンプレートを作る機能がないんですね。。。
テンプレートの一覧。
homebrewで入るよ。
$ g8 typesafehub/scala-sbt
このscala-sbtは、わりとベーシックなテンプレート。
$ tree scala-sbt scala-sbt ├── README ├── project │ └── ScalasbtBuild.scala └── src └── main └── scala └── org └── example └── Scalasbt.scala
build.sbtに相当するものが、ScalasbtBuild.scala だったりする。
プラグインの追加はこんな感じ。add other settings hereの下。
import sbt._ import sbt.Keys._ object SamplesbtBuild extends Build { lazy val samplesbt = Project( id = "sample-sbt", base = file("."), settings = Project.defaultSettings ++ Seq( name := "sample-sbt", organization := "org.example", version := "0.1-SNAPSHOT", scalaVersion := "2.10.2", // add other settings here libraryDependencies ++= Seq( "org.apache.abdera" % "abdera-bundle" % "1.1.3" ) ) ) }
ちょっと作ろうかなと思うんだけど、若干挫折しかかってるね。