Closed kwrooijen closed 5 years ago
Thanks for the PR. Before we talk about the actual code, the code needs to be moved to the duct.core.repl namespace, which is part of the duct/core library. This avoids unnecessary code in the project template.
Thanks for your feedback. I'll close this and move it to core.
Problem
There is no way to auto reload your Duct project currently. See: https://github.com/duct-framework/core/issues/12
Solution
As stated in https://github.com/duct-framework/core/issues/12 we can add Hawk as a dependency and write our own watcher.
Usage:
Notes
The auto-reset-handler was throwing an illegal state exception because of
*ns*
I fixed this by binding ns and then changing the namespace to
dev
. However I'd gladly accept a better solutionThere's quite a lot of additions to
dev.clj
, and most of it is private. Would you like me to create a separate namespace for the auto reloading code? If so would you please provide a suggestion?