heroweb/svelte/filemanager/install.sh

26 lines
611 B
Bash
Raw Normal View History

2024-09-02 08:00:49 +00:00
#!/bin/bash
2024-09-13 13:00:11 +00:00
set -ex
BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
source ${BASE_DIR}/myenv.sh
2024-09-02 08:00:49 +00:00
# Define the project directory
PROJECT_DIR="myfiles"
2024-09-02 12:50:47 +00:00
pushd ${BASE_DIR}/${PROJECT_DIR}
2024-09-13 13:00:11 +00:00
# if dir doesn't exit yet
# npm create vite@latest $PROJECT_DIR -- --template svelte --yes
2024-09-02 12:50:47 +00:00
# Check if node_modules exists, if not, install the package
if [ ! -d "node_modules" ]; then
npm config set @wx:registry https://npm.svar.dev
2024-09-02 08:00:49 +00:00
npm install
2024-09-13 13:00:11 +00:00
npm install @wx/trial-svelte-filemanager
2024-09-02 08:00:49 +00:00
npm install @wx/trial-svelte-gantt
npm install @wx/trial-svelte-grid
2024-09-02 12:50:47 +00:00
fi
2024-09-13 13:00:11 +00:00
popd &> /dev/null