My build.sbt
looks like this:
val client = project.in(file("client"))
val server = project.in(file("server"))
The main project comprises two separate projects, client and server. I would like to develop them simultaneously: I need both of them built and the server running when I'm working. Each project has their own additional build steps: client
needs a packageJS
after being compiled, while server
needs a container:restart
.
However, doing ~; restartServer; restartClient
from the root directory doesn't do what I want, since it listens to either subproject and always restarts both of them, and in my case causes a restart loop since one subproject dumps files into the other subproject for it to use.
Is there anyway to do this "~restartXXX" in both subprojects simultaneously, so I can edit either of them and it will restart only the edited project?
Have you tried: ~ all restartServer restartClient
.
In sbt 0.13.2-M2 (and I think sbt 0.13.1, but not sure), there is a new all
command which will run specified tasks in parallel. Combined with ~, you can ensure you run more than one task on a change.
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