Open jdan opened 9 years ago
Installing inotify tools and running the server using this ./tinman-server
bash file instead of tinman server
has worked in the interim. :)
#! /bin/bash
DIRECTORY_TO_OBSERVE="."
function block_for_change {
inotifywait -r \
-e modify,move,create,delete \
$DIRECTORY_TO_OBSERVE
}
TINMAN_PID=""
function build {
kill $TINMAN_PID
tinman server &
TINMAN_PID=$!
}
build
while block_for_change; do
build
done
@MichelleTodd yeah tinman server
as a concept is a bit silly, isn't it? If anything it should just spin up a simple static server instead of loading some templates into memory like it does now.
I think a combination of tinman build
and tinman build --watch
could replace it all together. Live-reloading on the client would be nifty too :)
Currently you need to restart a server or rebuild every time you edit a file, this gets annoying pretty quickly.
Tinman should watch for files and:
tinman server
tinman build
I'm thinking we add a simple
--live
option for this. I don't know if it should be the default behavior.