自动运行多个罗盘监视操作 [英] Running multiple compass-sass watch operations automatically

查看:102
本文介绍了自动运行多个罗盘监视操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试确定指南针(sass)一次观看多个目录的最佳方法.每个目录代表一个单独的客户及其网站.

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

我开始了解到,每个watch命令可能都需要单个进程,这是运行&的最佳做法每当添加/删除/移动文件夹时自动停止这些命令吗?

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?

推荐答案

也许Grunt会代替纯指南针吗?

Maybe Grunt would be an approach instead of pure compass?

我正在使用grunt-compass-multiple来配置要监视的多个sass目录: https://npmjs.org/package/grunt-compass-multiple

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根本不执行任何操作,因此您可以删除其中一个文件夹,而仍然让监视进程来处理其他文件夹.

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.

这篇关于自动运行多个罗盘监视操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆