开发者

How to minify Javascript if you use SBT 0.10 or later

开发者 https://www.devze.com 2023-04-09 18:38 出处:网络
How do you minify or obfuscate your Javascript files, if you build your Scala projects with Simple Build Tool (SBT) 0.10.x?

How do you minify or obfuscate your Javascript files, if you build your Scala projects with Simple Build Tool (SBT) 0.10.x?

Edit: Or later SBT versions, e.g. 0.11, 0.12.

开发者_JAVA百科(For earlier versions of SBT there are some plugins that minify/obfuscate Javascript, but as far as I can tell they haven't been upgraded to work with SBT 0.10.x. Two examples: Yui Compressor Plugin for SBT, and sbt-closure)

(Here's a list of SBT 0.10.x plugins; I didn't find any plugin that minifies Javascript.)


sbt-closure has a recently active branch that is targetting SBT 0.11 compatibility. You could wait for that to be completed, or, better yet, contribute! The SBT Mailing List or #sbt on Freenode IRC are good places to find help for plugin development.


In the interests of staying up to date, here's an actively-developed fork of the 'sbt-closure' plugin:

https://github.com/eltimn/sbt-closure

It's published to TypeSafe's Community Ivy Repository and is currently has builds against sbt versions 0.11.2, 0.11.3 and 0.12.0.

This question was originally about sbt 0.10.x, but I think later versions are probably of more interest by now.

0

精彩评论

暂无评论...
验证码 换一张
取 消