gpt4 book ai didi

include - Jade - 使用 --watch 不会触发包含的刷新

转载 作者:行者123 更新时间:2023-12-01 06:24:33 25 4
gpt4 key购买 nike

我有一个我正在尝试使用的简单项目。

doctype html
html(lang="en")
include ./inc/head.jade

body
include ./inc/various.jade
include ./inc/types.jade
include ./inc/of.jade
include ./inc/things.jade

使用这个命令来观看
jade -w index.jade

我希望对“things.jade”的任何更改都会触发对“index.jade”的刷新。它不是。我错过了什么?我不想每次需要刷新 index.jade 时都调用 watch 命令。

所需的工作流程:
save change in things.jade > triggers refresh to index.jade

当前问题:
save change in things.jade > switch to terminal > control+c to 
kill the watch on index.jade > jade -w index.html

最佳答案

我现在才看到你的问题,我希望你能解决它。
看来你需要' liveReload ' 以在保存文件时观察更改,然后重新加载浏览器。

如果您使用的是任务运行器,例如“gulp”,强烈建议您使用“gulp-connect” '它使用'LiveReload'运行本地网络服务器

使用这种技术,您不必每次需要刷新 index.jade 时都调用 watch 命令

关于include - Jade - 使用 --watch 不会触发包含的刷新,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30180899/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com