[英]How to watch typescript files in the background continuously without blocking the terminal?
Is there a way to run tsc -w
without blocking the terminal?有没有办法在不阻塞终端的情况下运行tsc -w
? In other words, is there a way to watch typescript files continuously, without blocking the terminal?换句话说,有没有办法在不阻塞终端的情况下连续观看 typescript 文件?
Sure.当然。 Run it as a background process.将其作为后台进程运行。 For example, if you're using bash:例如,如果您使用的是 bash:
tsc -w &
If you want to suppress the output:如果要抑制 output:
tsc -w &>/dev/null &
Though this means if there are any errors, you won't see them.虽然这意味着如果有任何错误,您将看不到它们。 You could pipe the output to a file instead of /dev/null
so that you could always less
or tail
the file anytime you needed to check what's up.您可以将 pipe 和 output 放到一个文件中,而不是/dev/null
,这样您就可以在需要检查发生了什么时随时less
或tail
文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.