如果您使用 SBT 0.10 或更高版本,如何缩小 Javascript
如果您使用 Simple Build Tool (SBT) 0.10 构建 Scala 项目,如何缩小或混淆 Javascript 文件。 x?
编辑:或更高版本的SBT,例如0.11、0.12。
(对于 SBT 的早期版本,有一些插件可以压缩/混淆 Javascript,但据我所知,它们尚未升级为可与 SBT 0.10.x 一起使用。两个示例: SBT 的 Yui 压缩器插件,以及 sbt-closure)
(这是 SBT 0.10.x 插件的列表;我没有找到任何可以缩小 Javascript 的插件。)
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.
(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.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
sbt-closure 有一个最近活跃的分支,目标是 SBT 0.11 兼容性。您可以等待完成,或者更好的是,贡献! SBT 邮件列表 或 Freenode IRC 上的 #sbt 都是好地方寻找插件开发帮助。
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.
为了保持最新状态,这里有一个积极开发的 'sbt 的分叉 -closure'插件:
https://github.com/eltimn/sbt-closure
它已发布到 TypeSafe 的 社区 Ivy 存储库,并且目前针对 sbt 版本 0.11.2、0.11.3 和 0.12.0 构建。
这个问题最初是关于 sbt 0.10.x 的,但我认为现在可能对更高版本更感兴趣。
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.