Is there a plugin for sbt available which automatically installs JRuby and adds some hooks to automatically run scripts at certain points (e.g. before compilation).
Background: For a (lift) project, I want to use sass, or more specifically, compass as a tool for generating the css. A Java or Scala clone of sass would not be enough, unfortunately.
Of course, It wouldn’t be a problem at all to just generate the css manually and then put both inside the repository and no-one ever needs to care about it.
On the other hand, to ease development on several systems, I’d rather have a clear dependency inside sbt which simply does the work.
Is there any way to achieve this?
Or generally: Is there a way to run JRuby scripts from inside Scala?
Edit Added maven-2 to the tags. Maybe there is a maven repo for JRuby which allows me to deliver and use it somehow.
While it's perhaps not the most elegant solution, you can always call external scripts using the Process support in SBT.
import sbt._
import Process._
class Project(info: ProjectInfo) extends DefaultProject(info) {
lazy val runSomething = task {
"ruby somescript.rb" ! log
None
}
}
There's a bit more info about the external process support available here: http://code.google.com/p/simple-build-tool/wiki/Process
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With