Hi all,

I just pushed a commit to royale-compiler that adds a new --watch compiler
option. What this new option does is keep the compiler running after it's
done, watching the source-path folders for any changes to .as and .mxml
files. When changes are detected, it will automatically re-compile your
project. Best of all, it's an incremental re-compile, so it will be
significantly faster.

For projects targeting JS, all you need to do is refresh your browser after
the re-compile completes. You can even use a tool that does this
automatically, if you prefer.

After a quick search on Google, I found the "reload" npm package, and I can
confirm that it can automatically reload a Royale app after recompilation.
Here is the command that I used in a terminal at the root of my project
folder:

npx reload -d bin/js-debug -b

This starts a local HTTP server in the directory bin/js-debug, and it
launches the app in a browser.

https://www.npmjs.com/package/reload#user-content-using-reload-as-a-command-line-application

The new --watch compiler option works with SWF too. However, I'm not aware
of any automatic reloading tools for this, so you'll just need to close and
relaunch manually.

Please give it a try, and let me know if you run into any issues. I'd like
to see how well it works with some bigger projects!

--
Josh Tynjala
Bowler Hat LLC <https://bowlerhat.dev>

Reply via email to