Reputation: 12439
Just starting out with the Play framework and one minor irritant is that it takes a long time (a few seconds) for it to recompile when I make a change then refresh so I can see it in the browser. This can get a bit irritating when making many minor adjustments to a view, for example.
Is there a magic way to make Play attempt to recompile whenever a source file is changed rather than waiting until the browser is refreshed?
Upvotes: 2
Views: 1354
Reputation: 12439
Yes. The Play console is based on SBT, which has a handy way to run a command whenever a source file is changed by prefixing it with a tilde. So prefix run
with a tilde like this in the Play console:
[my-play-app] $ ~run
And the application will attempt to recompile whenever a source file is changed, saving you precious seconds that soon start to add up.
Upvotes: 5