Skip to content

Instantly share code, notes, and snippets.

@ryo-murai
Created February 8, 2015 13:45
Show Gist options
  • Select an option

  • Save ryo-murai/fddb889eb71ae806e167 to your computer and use it in GitHub Desktop.

Select an option

Save ryo-murai/fddb889eb71ae806e167 to your computer and use it in GitHub Desktop.
activatorなしでplayする
#!/bin/sh
PROJECT=${1:sample}
SBT_VER=0.13.5
PLAY_VER=2.3.4
SCALA_VER=2.11.2
mkdir -p project
echo "sbt.version=${SBT_VER}" > project/build.properties
cat << EOF > project/plugin.sbt
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "${PLAY_VER}")
EOF
cat << EOF_BUILDSBT > build.sbt
lazy val root = Project(
"${PROJECT}", file(".")
).enablePlugins(PlayScala).settings(
scalaVersion := "${SCALA_VER}"
)
EOF_BUILDSBT
mkdir -p app/controllers conf
cat << EOF_CONTROLLER > app/controllers/Application.scala
package controllers
import play.api._
import play.api.mvc._
object Application extends Controller {
def index = Action {
Ok("hello world")
}
}
EOF_CONTROLLER
echo "GET / controllers.Application.index" > conf/routes
mkdir -p app/{models,views}
mkdir -p public/{images,javascripts,stylesheets}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment