mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-04 18:24:46 +02:00
Updating devcontainer setup and related documentation
This commit is contained in:
parent
dfae6cf89f
commit
6dc4dc8f49
9 changed files with 273 additions and 16 deletions
29
.devcontainer/post-create.sh
Normal file
29
.devcontainer/post-create.sh
Normal file
|
@ -0,0 +1,29 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Mark the working directory as safe for use with git
|
||||
git config --global --add safe.directory $PWD
|
||||
|
||||
# If there is no dev.js file, create it
|
||||
if [ ! -f dev.js ]; then
|
||||
cp .devcontainer/dev.js .
|
||||
fi
|
||||
|
||||
# Update permissions for node_modules folders
|
||||
# https://code.visualstudio.com/remote/advancedcontainers/improve-performance#_use-a-targeted-named-volume
|
||||
if [ -d node_modules ]; then
|
||||
sudo chown $(id -u):$(id -g) node_modules
|
||||
fi
|
||||
|
||||
if [ -d client/node_modules ]; then
|
||||
sudo chown $(id -u):$(id -g) client/node_modules
|
||||
fi
|
||||
|
||||
# Install packages for the server
|
||||
if [ -f package.json ]; then
|
||||
npm ci
|
||||
fi
|
||||
|
||||
# Install packages and build the client
|
||||
if [ -f client/package.json ]; then
|
||||
(cd client; npm ci; npm run generate)
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue