sbt/sbt-rjs — pull request #6 by huntc (2014-05-21 07:22:12+00:00)
Title: Improved configuration

Improved configuration further by extrapolating common properties and providing convenient extension points.

For example, supposing that your application does not use "main.js" as its main entry point and instead uses `app.js`:

```scala
RjsKeys.mainModule := "app"
```

(note the absence of the file extension).

If you wish to add a property that this plugin does not provide, but is available to rjs then you can provide a map of additional properties. Supposing that you wish to specify the locale to be used:

```scala
import RjsJs._
import RjsKeys._

...

buildProfile := Map("locale" -> j"en-au")
```

The `j` character preceding the string value declares a quoted string. `buildProfile` is a `Map[String, JS]` where `JS` is a type that holds JavaScript expressions. `RjsJs._` is required to be imported.

`RjsJs` also has functions to convert maps and sequences to the JS type via a `toJS` method. For example, [given an example from the rjs documentation](https://github.com/jrburke/r.js/blob/master/build/example.build.js#L388)
you can express:

```scala
import RjsJs._
import RjsKeys._

...

modules := modules.value ++ Seq(Map("name" -> j"foo/bar/bip", "exclude" -> Seq(j"foo/bar/bop").toJS))
```