Skip to content

Commit

Permalink
feat(sh): add script to update frontend files
Browse files Browse the repository at this point in the history
  • Loading branch information
cefeng06 committed Apr 19, 2024
1 parent 7a343b7 commit 6b0d961
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
16 changes: 16 additions & 0 deletions build_frontend.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

set -e

echo "deleting local env file..."
rm -f packages/app/.env.local

echo "compile frontend files..."
pnpm run --filter app build

echo "copy frontend files to python package dir..."
rm -rf deepdataspace/server/static/*
cp -R packages/app/dist/* deepdataspace/server/static/
cp deepdataspace/server/static/index.html deepdataspace/server/templates/

echo "frontend files updated!"
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "deepdataspace",
"private": true,
"scripts": {
"update:app": "chmod +x ./build_frontend.sh && ./build_frontend.sh",
"build:app": "pnpm run --filter app build",
"dev": "pnpm -r --parallel run start",
"dev:app": "pnpm run --filter app dev",
Expand Down

0 comments on commit 6b0d961

Please sign in to comment.