3 Commits
v0.1.0 ... main

Author SHA1 Message Date
Robin Chappatte
624c987e13 add backend npm package build step 2024-06-22 22:11:53 +02:00
Robin Chappatte
8412cc7d9d specify backend's deno config file and add run permission in build script 2024-06-22 18:20:03 +02:00
Robin Chappatte
f7f5f4954d add frontend and backend submodules 2024-06-06 13:34:27 +02:00
2 changed files with 19 additions and 4 deletions

6
.gitmodules vendored Normal file
View File

@@ -0,0 +1,6 @@
[submodule "frontend"]
path = frontend
url = https://git.chpt.dev/Chappatte/Audio-diffusion-web-manager-frontend.git
[submodule "backend"]
path = backend
url = https://git.chpt.dev/Chappatte/Audio-diffusion-web-manager-backend.git

View File

@@ -10,7 +10,15 @@ then
fi fi
function clean { function clean {
rm -rf ./frontend/dist && rm -rf ./backend/dist && rm -rf ./dist rm -rf ./frontend/dist && \
rm -rf ./backend/dist && \
rm -rf ./backend/npm && \
rm -rf ./dist && \
true
}
function build_backend_npm_package {
deno run --allow-env --allow-read --allow-write=./backend/npm --allow-run=npm ./backend/build-for-npm.ts ./backend/npm 1.0.0
} }
function build_frontend { function build_frontend {
@@ -20,7 +28,7 @@ function build_frontend {
cd "$dir" cd "$dir"
} }
function build_backend { function bundle_frontend_files_info_single_json_file {
deno run --allow-read=./frontend/dist,./dist --allow-write=./dist ./bundle.ts ./frontend/dist ./dist/bundled-view-files.json deno run --allow-read=./frontend/dist,./dist --allow-write=./dist ./bundle.ts ./frontend/dist ./dist/bundled-view-files.json
cp ./dist/bundled-view-files.json ./backend/src/modules/view/bundled-view-files.json cp ./dist/bundled-view-files.json ./backend/src/modules/view/bundled-view-files.json
} }
@@ -28,7 +36,7 @@ function build_backend {
function compile_for { function compile_for {
target=$1 target=$1
mkdir -p "./dist/bin" mkdir -p "./dist/bin"
deno compile --target "$target" --output "./dist/bin/$target" --allow-net --allow-read --allow-write --allow-sys ./backend/src/main.ts deno compile --config "./backend/deno.json" --target "$target" --output "./dist/bin/$target" --allow-net --allow-read --allow-write --allow-sys --allow-run ./backend/src/main.ts
} }
function compile_all { function compile_all {
@@ -41,6 +49,7 @@ function compile_all {
clean clean
build_backend_npm_package
build_frontend build_frontend
build_backend bundle_frontend_files_info_single_json_file
compile_all compile_all