Added NodeJS package with WebPack for some assets.
Moved JS files to WebPack system. Created python script to watch both WebPack and Dotnet files simultaneously
This commit is contained in:
24
scripts/watch_all.py
Normal file
24
scripts/watch_all.py
Normal file
@@ -0,0 +1,24 @@
|
||||
import os
|
||||
import asyncio
|
||||
import sys
|
||||
|
||||
SERVER_CSPROJ_DIR = "src/MultiShop/Server"
|
||||
ASSET_WATCH_DIR = "src/MultiShop/Client/assets"
|
||||
|
||||
|
||||
async def exec(cmd, path):
|
||||
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
||||
os.chdir(os.pardir)
|
||||
os.chdir(path)
|
||||
proc = await asyncio.create_subprocess_shell(
|
||||
cmd,
|
||||
stdout=sys.stdout,
|
||||
stderr=sys.stderr,
|
||||
)
|
||||
|
||||
await proc.wait()
|
||||
|
||||
async def main():
|
||||
await asyncio.gather(exec("dotnet watch run", SERVER_CSPROJ_DIR), exec("npm run watch", ASSET_WATCH_DIR))
|
||||
|
||||
asyncio.run(main())
|
Reference in New Issue
Block a user