Skip to content

Instantly share code, notes, and snippets.

@davidkrisch
Created December 7, 2011 22:41
Show Gist options
  • Save davidkrisch/1445074 to your computer and use it in GitHub Desktop.
Save davidkrisch/1445074 to your computer and use it in GitHub Desktop.
HOWTO: Watchr recompiling Less on Save
# Install the necessary packages
# Assumes node.js/npm and ruby/gem are already installed
npm install less
gem install watchr
Create a .less file.
Run this (replace <filename> with the actual filename)
watchr -e 'watch("<filename>") { |f| system("lessc #{f[0]}") }' &
Save the .less file and observe the css output in the terminal.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment