diff --git a/dashboard/build.sh b/dashboard/build.sh index 3b79a0616..3fedfe8eb 100755 --- a/dashboard/build.sh +++ b/dashboard/build.sh @@ -2,9 +2,6 @@ set -eu -echo "=> Update translation files" -npm run update-translations - echo "=> Create timezones.js" ./scripts/createTimezones.js ./public/js/timezones.js diff --git a/dashboard/develop.sh b/dashboard/develop.sh new file mode 100755 index 000000000..7790c176c --- /dev/null +++ b/dashboard/develop.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -eu + +echo "=> Set API origin" +export VITE_API_ORIGIN="my.nebulon.space" + +echo "=> Run vite locally" +npm run dev diff --git a/dashboard/package.json b/dashboard/package.json index 8519fea3c..b5ce57b87 100644 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -4,7 +4,9 @@ "description": "[Cloudron](https://cloudron.io) is the best way to run apps on your server.", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "update-translations": "curl https://translate.cloudron.io/api/components/cloudron/dashboard/file/ -o lang.zip && unzip -jo lang.zip -d ./public/translation/ && rm lang.zip" + "update-translations": "curl https://translate.cloudron.io/api/components/cloudron/dashboard/file/ -o lang.zip && unzip -jo lang.zip -d ./public/translation/ && rm lang.zip", + "dev": "vite --strictPort --port 4000", + "build": "vite build" }, "repository": { "type": "git",