Skip to content

Commit 7a2fec9

Browse files
committed
snapshot awatch
1 parent d4f7530 commit 7a2fec9

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

ide/deploy/awatch.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
SKIPDIR = ["virtualenv", "node_modules", "__pycache__"]
2+
3+
import watchfiles
4+
import asyncio
5+
6+
from .deploy import deploy
7+
from .client import serve
8+
9+
async def loop():
10+
async for changes in watchfiles.awatch()
11+
12+
def watch():
13+
asyncio.run(loop())
14+
try:
15+
serve()
16+
except KeyboardInterrupt:
17+
print("Interrupted.")
18+
19+

ide/deploy/client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ def serve():
3333
devel = get_nuvolaris_config("devel")
3434
if devel is None:
3535
devel = "nuv ide serve"
36-
Popen(devel, shell=True, cwd=os.environ.get("NUV_PWD"), env=os.environ)
36+
print(devel)
37+
Popen(devel, shell=True, cwd=os.environ.get("NUV_PWD"), env=os.environ).communicate()
3738

3839
def build():
3940
deploy = get_nuvolaris_config("deploy")

0 commit comments

Comments
 (0)