Home

Awesome

Play Auto Refresh

This is an SBT plugin for Play Framework (or sbt-web) apps which works with a Chrome Extension to auto-refresh your browser when you make changes to your app.

Setup

  1. Add the SBT plugin to your project/plugins.sbt file (make sure to add an empty line before this one):
addSbtPlugin("com.jamesward" % "play-auto-refresh" % "0.0.20")
  1. The plugin bootstraps itself automatically as soon as you enable Play in your project.

  2. Add the Play Framework Tools Chrome Extension

  3. Start your Play app in file watch mode:

sbt ~run
  1. The browser window should open automatically. If you don't want this add the following to your build.sbt:
shouldOpenBrowser := false
  1. Make a change to the code for your application and watch your changes magically appear in your browser!

Release Info

Developer Info

Chrome Extension

The source code of the extension can be found here: https://github.com/jamesward/play-framework-chrome-tools

Test Project

  1. cd test-project
  2. sbt ~run
  3. Install the Play Framework Tools Chrome Extension
  4. Check out the app: http://localhost:9000
  5. Change a asset and watch your browser magically reload the changes!

Release

  1. Update the version and "Release Info" in README.md
  2. Git Tag: git tag -s v0.0.xx
  3. Push tag
  4. Watch workflow doing the magic: https://github.com/jamesward/play-auto-refresh/actions/workflows/publish.yml
  5. Wait (sometimes 15 minutes, sometimes 2 hours): https://repo1.maven.org/maven2/com/jamesward/play-auto-refresh_2.12_1.0
  6. Enjoy!