samedi 7 mars 2015

Use fswatch to make files that changed


I am using the following command to run make automatically when less files in my project change. But right now make runs on all the files whenever any file changes. Is there a way to make only the changed file?



fswatch -0 *.less | xargs -0 -n1 -I{} make


fswatch returns /Users/sourabh/code/websites/http://ift.tt/1BiEWHt etc


make header.css makes the ../header.css file from header.less file. Here's the makefile, just in case it's required



LESS_FILES = footer.less general.less header.less main.less
CSS_FILES = $(LESS_FILES:.less=.css)

%.css: %.less
lessc $< > ../$@
autoprefixer ../$@

all: $(CSS_FILES)




Aucun commentaire:

Enregistrer un commentaire