Skip to content

Commit

Permalink
check if dist directory exists when starting dev server
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieScottC committed Nov 1, 2023
1 parent 4e056b1 commit 6d193d8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ def list_str(values):
app_svc.register_subapp('/api/v2', app.api.v2.make_app(app_svc.get_services()))
init_swagger_documentation(app_svc.application)
if (args.uiDevHost):
if not os.path.exists("./plugins/magma/dist"):
logging.info("Building VueJS front-end.")
subprocess.run(['npm', 'run', 'build'], cwd='plugins/magma', check=True)
logging.info("VueJS front-end build complete.")
app_svc.application.on_response_prepare.append(enable_cors)

if (args.build):
Expand Down

0 comments on commit 6d193d8

Please sign in to comment.