1. Joachim Hofer
  2. play-clojurescript

Overview

HTTPS SSH

play-clojurescript - ClojureScript to JavaScript compiler for Play 2

About

This plugin is initially based on play-jsonminify.

play-clojurescript is a ClojureScript 'compiled asset plugin' for Play 2.x. It is similar to the other built-in compilers. ClojureScript files placed under app/assets will be compiled to JavaScript files.

Installation

Add the plugin and the repository to your application's project/plugins.sbt:

addSbtPlugin("de.johoop" % "play-clojurescript" % "1.0.0")

This adds the ClojureScript asset compiler to your Play project. *.cljs files beneath app/assets will then be automatically compiled to *.js and *.min.js files. Files starting with _-character will be left out from compilation as per Play convention.

Settings

To override the default settings, you can add the following lines to the settings call in your Build.scala:

  • clojureScriptEntryPoints: SettingKey[PathFinder] - defines which files will be accepted as ClojureScript sources to compile to JavaScript
  • clojureScriptOptions = SettingKey[Seq[String]] - defines additional compiler options; currently none are supported, though

Versions

  • 1.0.0 [2013-03-01] Initial release

License

Copyright (c) 2013 Joachim Hofer

Eclipse Public License - v1.0