Skip to content
master
Switch branches/tags
Go to file
Code
This branch is 61 commits ahead, 1 commit behind tototoshi:master.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

play-scalate

Install

libraryDependencies ++= Seq(
  "org.scalatra.scalate" %% "play-scalate" % "0.5.0",
  "org.scalatra.scalate" %% "scalate-core" % "1.9.1",
  "org.scala-lang" % "scala-compiler" % scalaVersion.value
)

unmanagedResourceDirectories in Compile += baseDirectory.value / "app" / "views"

Usage

package controllers

import javax.inject.{ Inject, Singleton }

import com.github.tototoshi.play2.scalate._
import play.api.mvc._

@Singleton
class JadeController @Inject() (scalate: Scalate, val controllerComponents: ControllerComponents) extends BaseController {

  def index = Action { implicit request =>
    Ok(scalate.render("index.jade", Map("message" -> "hello, jade")))
  }

}