Commits

cf8 committed 4dbd982

bash function to watch for modified .less files, compile them and minimize with uglifycss

  • Participants
  • Parent commits e45899c

Comments (0)

Files changed (1)

 # path
 path=($path ~/bin ~/.gem/ruby/1.9.1/bin/)
 
+lesswatch () {
+	while true; do
+		N=`find -name "*.less" `;
+		inotifywait -qe modify $N ;
+		for f in $N;do
+			lessc $f ${f%.*}.css;
+			uglifycss ${f%.*}.css > ${f%.*}.min.css;
+		done;
+	done
+}