Skip to content

Instantly share code, notes, and snippets.

@bcho
Created July 19, 2012 13:07
Show Gist options
  • Save bcho/3143786 to your computer and use it in GitHub Desktop.
Save bcho/3143786 to your computer and use it in GitHub Desktop.
Guardfile
#!/usr/bin/env python2
from os.path import join
from livereload.task import Task
from livereload.compiler import lessc
static = 'static'
def _add_css():
css_path = join(static, 'css')
css_suffix = '.css'
less_suffix = '.less'
for f in ['style']:
file_path = join(css_path, f)
css = file_path + css_suffix
less = file_path + less_suffix
print css, less
Task.add(less, lessc(less, css))
return
def _main():
print 'enter'
_add_css()
return
_main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment