Hey Martin,
I'm not an expert, but I've asked and dealt with similar issues in the past. The short of it is that tup was designed to give consistent builds always. As such, it essentially doesn't allow for cache files and directories because then it can't guarantee that the exact same things are running. If you want to use tup to build it, then the trivial way would be to do
: elm-package.json |> elm-make --yes Main.elm && rm -rf elm-stuff |> index.html
This is probably not ideal, as based on what you've described, each build is going to have elm re-download every dependency, in addition to a cache-less build. I don't think you can get away from cache with tup, but you might be able to get around the dependency download. The high level would be that you want to set up rules for the pieces that are downloaded. Assuming elm-make won't write to them if they're up to date, and the dependencies are written to different files then the cache with predictable names, you could do something like:
: elm-package.json |> ... |> elm-stuff/... <deps>
: elm-package.json <deps> |> elm-make --yes Main.elm && rm ...cache files... |> index.html
I'm not sure what the first command is, but you could probably be clever by using the lua api to parse the elm-dependencies to generate what those commands are.
The second part of the last command could probably be something like `comm -23 <(ls elm-stuff) <(<<< "%<deps>" tr ' ' '\n' | sort) | xargs rm -rf`.
Hope that helps,
Erik