【问题标题】:sass watching multiple directoriessass 看多个目录
【发布时间】:2012-05-29 15:31:52
【问题描述】:

在 sass 中,从 shell 脚本中查看多个目录的正确方法是什么?

我在 shell 脚本中有以下内容:

sass --style compressed --watch branches/mysite/assets/css/sass:branches/mysite/assets/css &
sass --style compressed --watch branches/mysite2/themes/css/sass:branches/mysite2/themes/css &
sass --style compressed --watch trunk/assets/css/sass:trunk/assets/css

但是,这会创建 3 个进程,当我按 Ctrl+C 停止时,并非所有进程都退出。

如何让 sass 观看多个目录并正确退出?

【问题讨论】:

  • 查看包含所有项目的文件夹怎么样?例如。 sass --style 压缩 --watch /var/
  • 因为每个路径下sass压缩成css的目录都不一样。

标签: css shell sass watch


【解决方案1】:

我希望你已经尝试过了,但你可以将所有文件夹添加到一个命令行中:

sass --watch path/to/sass1:path/to/css1 path/to/sass2:path/to/css2 path/to/sass3:path/to/css3

【讨论】:

  • 我不知道为什么我从未尝试过。太感谢了!这非常有效!
  • 看起来不错,尤其是在 shell 脚本中实现时
  • 当我使用命令替换(例如$(script that produces folders))时,sass 将参数解释为一个path/to/sass1 和一个path/to/css1 path/to/sass2:path/to/css2 path/to/sass3:path/to/css3,从而导致无效路径异常
  • 这已经很老了。那里有足够的帮助来观看 sass/less 。插件与框架等一起出现
  • @mohas 您能否为命令替换生成的 sass 提供一个完整的参数?这些确实是用:分割的文件对吗?
猜你喜欢
  • 2016-10-21
  • 2012-03-30
  • 1970-01-01
  • 1970-01-01
  • 2018-11-15
  • 2017-07-25
  • 2013-08-27
  • 2011-08-30
相关资源
最近更新 更多