I propose an extension to the tilt exe, as outlined in the usage information. I think this will make tilt much more capable because you could render a whole series of templates from an input dir to an output dir.
I plan on building this behavior somewhere. If you like this proposal, then I'll write it into tilt itself. Otherwise, I'll make a separate fork or project.
Thanks! Appreciate the great library!
mkdir -p inputs outputs
echo "obj: milk" > attributes.yml
echo "Got <%= obj %>" > inputs/file.txt.erb
tilt --attrs attributes.yml --input-dir inputs --output-dir outputs --files inputs/*
The result would be 'outputs/file.txt' with content 'Got milk'.
outline proposed behavior for tilt
sketch out tests for tilt exe
remove unimplmented -o option
implement -a/--attrs on exe
sketch out -f -i -o implementation
clarify the determination of output files
allow exe to handle multiple files
add support for stdin input in file and stream modes
handle a variety of exe error cases
exe test cleanup
remove unnecessary require in exe
add debug information to tilt help
accomodate MiniTest by renaming a few things in the exe tests
Ok, so the extension is done. An example using it to build a static site is here: https://gist.github.com/1734959
Add documentation of exe test strategy and test helpers.
I think a separate project is a better approach.