I have a Phoenix project
PrjA with a
My goal is to be able to edit
DepA and have the
PrjA server to:
- run a mix task of
1 is easy, using the
:reloadable_apps option of Phoenix.CodeReloader.reload
2 is not so important
Regarding 3, I would love to run
mix assets.build in
My current solution is to run a task that rebuilds the assets in another shell from
I was wondering if there’s a way to avoid that.
If this is for development than I think the easiest way is to use GitHub - falood/exsync: Yet another elixir reloader. and set its
reload_callback to a function that calls the mix task. You’ll also have to use a path dependency.
A generic solution is to use
entr. GitHub - eradman/entr: Run arbitrary commands when files change
It is a command line tool that lets you do anything when any files change.
For example, here is how I “re-create docs when any of the
lib files change”:
find lib/ | entr -s 'mix format; mix docs -f html;'