Skip to content

version 1.0.8

Choose a tag to compare
@seratch seratch released this 18 Apr 05:41

Skinny Framework 1.0.8 is out.


Scala.js Source Maps Support

Add generated JS files to html

NOTICE: This is a documentation for Scala.js 0.4.

Append the following code to src/main/webapp/WEB-INF/layouts/default.ssp.

<script type="text/javascript" src="${uri("/assets/js/application-extdeps.js")}"></script>
<script type="text/javascript" src="${uri("/assets/js/application.js")}"></script>
Add Scala code

Create src/main/webapp/WEB-INF/assets/scala/Sample.scala:

import scala.scalajs.js
import js.annotation.JSExport

object Sample {

  def twice(s: String): String = {
    val ss = s * 2
Invoke scalajs:watch process (Terminal 1)
./skinny scalajs:watch 
Run Skinny app (Terminal 2)
./skinny run
Try with browser's developer tools

ScalaJS SourceMaps SS

SkinnyApiController, SkinnyApiServlet

When you don't need Flash or Scalate template engine, consider using SkinnyApiController or SkinnyApiServlet. These traits are simpler than normal SkinnyController.

In skinny-blank-app, a base trait named ApiController is prepared. When you create a simple HTTP API endpoints, use ApiController instead.

package controller.api

class ConfigurationsController extends ApiController {
  beforeAction() { contentType = formats("json") }
  def showAll = toJSONString(Configuration.findAll())


  • [assets] #115 Scala.js source maps support
  • [blank-app] Bumped Scala.js to 0.4.3
  • [blank-app] Excluded unnecessary xsbt-web-plugin dependencies
  • [framework] Added SkinnyApiController/SkinnyApiServlet for stateless APIs
  • [test] Fixed MockHttpServletResponse's StackOverflowError
  • [validator] Refactored validator's Error API to be friendly with json4s