Created
February 8, 2015 13:45
-
-
Save ryo-murai/fddb889eb71ae806e167 to your computer and use it in GitHub Desktop.
activatorなしでplayする
This file contains hidden or 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
| #!/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