klen / python-scss

Python scss parser.
http://packages.python.org/scss/
GNU Lesser General Public License v3.0
67 stars 12 forks source link

Add "watch" functionality, similar to Ruby's sass tool #4

Closed singingwolfboy closed 13 years ago

singingwolfboy commented 13 years ago

The "sass" tool installed with Ruby's haml gem has an awesome feature where you can watch a file or a directory, and whenever any of those .scss files are changed, the .css files are instantly and automatically recompiled from the newly changed .scss file. Would it be possible to add this feature to python-scss?

singingwolfboy commented 13 years ago

As a stopgap, you can run the scss automatically every few seconds using GNU watch, from here: http://procps.sourceforge.net/

It's not as good as only running the tool when the file actually changes (uses more system resources), but it gets the job done anyway.

klen commented 13 years ago

I added a simple implementation of watch in version 0.6.5, Should work with files and directories.

klen commented 13 years ago

Use -w, --watch option.

singingwolfboy commented 13 years ago

In that case, it should be documented in the scss help message. I didn't know that feature existed!

klen commented 13 years ago

I added it just now :) Version 0.6.5 done 5 minutes ago

singingwolfboy commented 13 years ago

Oh wow! Thanks! Updated (and I updated the Macports port, as well)