Ank*_*kit 68 css build-process sass watch
如何跟踪包含许多sass文件的整个目录中的更改?我正在使用以下命令来观察sass中的更改
文件:
sass --watch style.scss:style.css
Run Code Online (Sandbox Code Playgroud)
但是如何在包含许多sass文件的整个目录/文件夹中观察更改.
pio*_*ouM 87
只需使用命令sass --watch <input folder>:<output folder>,如下所示:
$ ls -l
css/ sass/
$ sass --watch sass:css
Run Code Online (Sandbox Code Playgroud)
其中<input folder>包含Sass文件并<output folder>托管生成的CSS文件.
Gar*_*son 28
通过piouPiouM扩展答案:
.css.结尾.<input folder>并且<output folder>可以是相同的.两个文件夹都可以是当前工作目录,因此以下内容有效:
$ sass --watch .:.
我最终没有使用Grunt或Sass-watch这样做:
npm install -g watch
watch "sass assets/app.scss assets/dist/app.css" assets/css
Run Code Online (Sandbox Code Playgroud)
转到你的终端并找到你的文件夹然后写道:
sass --watch .
Run Code Online (Sandbox Code Playgroud)
这将监视所有sass文件并转换为具有相同名称的css文件.你也可以这样做:
sass --watch ~/user/youUser/workspace/project/styles/
Run Code Online (Sandbox Code Playgroud)
我希望这可以帮到你.
if you are in your current folder then do the following to watch it.
F:\sass tutorial>sass --watch ./:./
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
60514 次 |
| 最近记录: |