Running multiple compass-sass watch operations automatically [duplicate]

跟風遠走 提交于 2019-11-30 21:22:45

问题


I am trying to determine the best possible approach for compass (sass) to watch multiple directories at once. Each directory represents an individual customer and their website.

/var/www/customers/domain1.com
/var/www/customers/domain2.com
/var/www/customers/domain3.com

I've come to understand it might require single processes for each watch command, what would be best practice for running & stopping these commands automatically, whenever a folder is added/deleted/moved?


回答1:


Maybe Grunt would be an approach instead of pure compass?

I'm using grunt-compass-multiple to be able to configure multiple sass directories to be watched: https://npmjs.org/package/grunt-compass-multiple

Grunt simply does nothing, if a specified directory is missing, so you would be able to delete one of the folders and still let the watch process take care of the others.

Adding/moving folders can be observed with the help of clever placeholder (*) rules.



来源:https://stackoverflow.com/questions/20661596/running-multiple-compass-sass-watch-operations-automatically

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!