Skip to content

Instantly share code, notes, and snippets.

@verma
Created December 5, 2015 19:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save verma/b025b15bcf2edc0b9538 to your computer and use it in GitHub Desktop.
Save verma/b025b15bcf2edc0b9538 to your computer and use it in GitHub Desktop.
#!/bin/sh
lessc resources/less/lurch.main.less resources/public/css/lurch.css
#!/bin/sh
# development script, start a tmux session with two sessions
SESSION_NAME=lch-frontend-dev
tmux has-session -t $SESSION_NAME
if [ $? != 0 ] ; then
tmux new-session -s $SESSION_NAME -n lein -d 'lein figwheel'
tmux split-window -v -t $SESSION_NAME './scripts/watch-less.sh'
tmux select-layout -t $SESSION_NAME even-vertical
fi
tmux attach -t $SESSION_NAME
#!/bin/sh
TARGET_PATH=resources/less
# start the compile script
./scripts/compile-less.sh
echo "Watching path: $TARGET_PATH"
OS=`uname`
if [ "$OS" = "Linux" ] ; then
echo "Using inotifywait for watching less changes"
while inotifywait -e modify $TARGET_PATH ; do
./scripts/compile-less.sh
done
else
echo "Using fswatch for watching less changes"
fswatch -0 $TARGET_PATH | xargs -0 -n1 -I{} ./scripts/compile-less.sh
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment