play2-scalate-plugin

将Scalate与Play Framework集成的插件。(Plugin that integrates Scalate with PlayFramework)

  • Owner: kryptt/play2-scalate-plugin
  • Platform: Linux, Mac, Solaris, Windows
  • License::
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

play2-scalate-plugin

Plugin that integrates Scalate with PlayFramework

The plugin is divided in two parts:

"net.kindleit" %% "play2-scalate-compiler" % "0.1-SNAPSHOT"
"net.kindleit" %% "play2-scalate-plugin" % "0.1-SNAPSHOT"

The compiler adds sbt tasks to precompile scalate templates into Play! compatible template files, and the plugin exports
the required TemplateEngine so that the compiled code can render properly (this is due to a current limitation in scalate with help we can make this plugin go away all together)

The plugin is published via OSS Sonatype to maven central.

To use the compiler, add the following lines to plugins.sbt (or the Build.scala):

addSbtPlugin("net.kindleit" %% "play2-scalate-compiler" % "0.1-SNAPSHOT")

And add

val project = play.Project(...).settings(ScalateSettings.scalateSettings)

to register the required source Generators.

For the plugin, add the following dependency in your Build.scala

val appDependencies = Seq(
  "net.kindleit" %% "play2-scalate-plugin" % "0.1-SNAPSHOT"
)

And register the plugin via conf/play.plugins

300:net.kindleit.scalate.ScalatePlugin

And your all set.

You can have the following infrastructure:

/app/views/index.jade
/app/views/school.scaml

etc...

Happy hacking!

Main metrics

Overview
Name With Ownerkryptt/play2-scalate-plugin
Primary LanguageScala
Program languageScala (Language Count: 1)
PlatformLinux, Mac, Solaris, Windows
License:
所有者活动
Created At2013-04-03 02:26:21
Pushed At2013-04-06 01:43:44
Last Commit At2013-04-05 20:43:43
Release Count0
用户参与
Stargazers Count12
Watchers Count5
Fork Count3
Commits Count10
Has Issues Enabled
Issues Count0
Issue Open Count0
Pull Requests Count0
Pull Requests Open Count0
Pull Requests Close Count0
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private