Began transition to Vue3.

Implemented logging in and logging out.

Implemented authenticated http client.

Laid some groundwork for SCSS.
This commit is contained in:
2021-07-09 21:47:40 -05:00
parent 54b1565537
commit 3d3c43b944
284 changed files with 20487 additions and 38338 deletions

View File

@@ -0,0 +1,28 @@
import os
import shutil
SERVER_DIR = "src/MultiShop/Server"
DATA_DIR = "Data"
DB_MIGRATE_CMD = "dotnet ef migrations add InitialCreate -o {0}"
DB_UPDATE_CMD = "dotnet ef database update"
os.chdir(os.path.dirname(os.path.realpath(__file__)))
os.chdir("..")
os.chdir(SERVER_DIR)
print("Working in: " + os.getcwd())
migrationsDir = os.path.join(DATA_DIR, "Migrations")
print("Deleting current migrations directory if it exists.")
shutil.rmtree(migrationsDir, ignore_errors=True)
print("Deleting old app.db if it exists.")
if os.path.exists("app.db"):
os.remove("app.db")
print("Creating migration.")
os.system(DB_MIGRATE_CMD.format(migrationsDir))
print("Updating database.")
os.system(DB_UPDATE_CMD)

View File

@@ -0,0 +1,29 @@
import os
import asyncio
import sys
SERVER_CSPROJ_DIR = "server"
CLIENT_PACKAGE_DIR = "client"
async def exec(cmd, path):
os.chdir(os.path.dirname(os.path.realpath(__file__)))
os.chdir(os.pardir)
os.chdir(path)
print("Executing \"{0}\" in \"{1}\".".format(cmd, path))
proc = await asyncio.create_subprocess_shell(
cmd,
stdout=sys.stdout,
stderr=sys.stderr,
)
await proc.wait()
async def main():
print("Beginning development servers.")
await asyncio.gather(
exec("dotnet watch run", SERVER_CSPROJ_DIR),
exec("npm run serve", CLIENT_PACKAGE_DIR))
asyncio.run(main())