Skip to content

Instantly share code, notes, and snippets.

@xuwei-k
Created April 4, 2012 14:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xuwei-k/2302261 to your computer and use it in GitHub Desktop.
Save xuwei-k/2302261 to your computer and use it in GitHub Desktop.
watch d_lang source use sbt
{
val script = "hello.d"
seq(
TaskKey[Unit]("dmd") <<= (compile in Compile).map{ _ =>
val ret = ("dmd -run " + script) !;
if(ret != 0)sys.error("compile fail")
}
,
watchSources += file(script)
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment