From 90d99ae65b278fb1ff9a428cc337b7922d09b868 Mon Sep 17 00:00:00 2001 From: brianwawok Date: Fri, 17 Jul 2015 16:52:34 -0400 Subject: [PATCH] include minified change in depending doc --- doc/sbt/depending.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/sbt/depending.md b/doc/sbt/depending.md index b8695c8c..6bc5a72a 100644 --- a/doc/sbt/depending.md +++ b/doc/sbt/depending.md @@ -93,3 +93,16 @@ skip in packageJSDependencies := false {% endhighlight %} in your project settings. The resulting file in the target folder will have the suffix `-jsdeps.js`. + +### Minified versions of JS dependencies + +The `minified` modifier to `jsDependencies` allows to specify minified alternatives of JS libraries. +Use it like this: + + jsDependencies += + "org.webjars" % "immutable" % "3.4.0" / "immutable.js" minified "immutable.min.js" + +Minified dependencies are packaged with `packageMinifiedJSDependencies`, which is automatically called when `fullOptJS` is invoked. +The result is put in a file `-jsdeps.min.js` next to `-jsdeps.js`. + +Obviously, for JS dependencies that do not specify a minified version, their non-minified version is used instead.