capnfabs / grouse

A diff tool for Hugo static sites.
https://capnfabs.net/posts/grouse-diff-tool-hugo-static-site-generators/
MIT License
12 stars 2 forks source link

Support custom build commands, not just custom build args #6

Open capnfabs opened 4 years ago

capnfabs commented 4 years ago

It's not always sufficient to just run hugo for a build -- many sites have different build processes.

e.g.

So, I think adding a --build-cmd command-line switch would be valuable. It's probably also worth allowing you to specify it twice to get different builds for different versions (like, if you've moved your build script to a new location between the two commits). This would also allow you to do e.g. --build-cmd=hugo --build-cmd=~/Downloads/hugo to diff between your system hugo and the new version you just downloaded.

I guess this should be run in a login shell, because people are used to thinking of their build command as a shell command, and that means that they'd be able to do things like e.g. use their standard aliases, and chain commands (e.g. npm install && hugo).

capnfabs commented 4 years ago

This would also mean we can support static site generators other than Hugo.