Introducing Publishmon
Recently, I made the decision to rewrite my personal site/blog using Publish
. Publish is a popular choice for iOS developers and Swift enthusiasts, and I quite enjoyed the learning curve. However, one thing bothered me: I hated the fact that I had to manually regenerate files and run publish run
in the terminal to restart the HTTP server. I remembered when I was writing some Node.js code that there was a package called nodemon
, which would restart the server every time a file changed. I searched for a similar solution for Publish but didn't find any. So, the idea of Publishmon
was born!
I tinkered with some FSEventStreamCreate
APIs and managed to make the site regeneration flow work pretty nicely with Publish. Behind the scenes, Publishmon runs publish run for you every time one of your source files changes. It's available as a Swift package on this repository.
Until next time!