less.ruby icon indicating copy to clipboard operation
less.ruby copied to clipboard

Watch multiple files

Open j0hnsmith opened this issue 16 years ago • 2 comments

It would be nice if less could watch multiple files

lessc -w file1.less file2.less file3.less

j0hnsmith avatar Nov 06 '09 03:11 j0hnsmith

No only that, but my issue is that I have like 6 files chained together, but they all get compiled into screen.css, so I want saving any of those files to trigger the generation of just my final screen.css

timkelty avatar Feb 11 '10 17:02 timkelty

My proposition: make a --watch_all option which would watch all .less files in a directory recursively (in all subdirs) AND 'recompile' all files when any of them is changed (don't spit a message for any css files that haven't been changed as a result).

It's a real pain, especially with @import'ed file not seeing variables set in their 'parent' files. Right now I need a screen.less, some_mixins.less (with a particular group of mixins) and global_vars.less (which is imported by every file). If I want to change a single var in global_vars, which influences some mixin, I need to do that first, then change anything in some_mixins.less to make it recompile, revert that change (I didn't really want it...) and then change something in screen.less and change it back (again, I didn't want that change). All that to change a single var!

muszek avatar Feb 21 '10 12:02 muszek