mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-29 03:39:13 -04:00
Added initial bun support.
This commit is contained in:
parent
b6ce8c7377
commit
8be2dffc37
9 changed files with 32 additions and 9619 deletions
|
@ -8,20 +8,17 @@ cd "${MY_DIR}/../.." || exit 1
|
|||
# Source constants and useful functions
|
||||
. src/bin/functions.sh
|
||||
|
||||
# Is node installed?
|
||||
# Not checking io.js, default installation creates a symbolic link to node
|
||||
is_cmd node || fatal "Please install node.js ( https://nodejs.org )"
|
||||
# Is bun installed?
|
||||
is_cmd bun || fatal "Please install bun ( https://bun.sh )"
|
||||
|
||||
# Is npm installed?
|
||||
is_cmd npm || fatal "Please install npm ( https://npmjs.org )"
|
||||
|
||||
# Check npm version
|
||||
require_minimal_version "npm" "$(get_program_version "npm")" \
|
||||
"$REQUIRED_NPM_MAJOR" "$REQUIRED_NPM_MINOR"
|
||||
#require_minimal_version "npm" "$(get_program_version "npm")" \
|
||||
# "$REQUIRED_NPM_MAJOR" "$REQUIRED_NPM_MINOR"
|
||||
|
||||
# Check node version
|
||||
require_minimal_version "nodejs" "$(get_program_version "node")" \
|
||||
"$REQUIRED_NODE_MAJOR" "$REQUIRED_NODE_MINOR"
|
||||
#require_minimal_version "nodejs" "$(get_program_version "node")" \
|
||||
# "$REQUIRED_NODE_MAJOR" "$REQUIRED_NODE_MINOR"
|
||||
|
||||
# Get the name of the settings file
|
||||
settings="settings.json"
|
||||
|
@ -48,10 +45,10 @@ cd src
|
|||
|
||||
if [ -z "${ETHERPAD_PRODUCTION}" ]; then
|
||||
log "Installing dev dependencies"
|
||||
npm ci --no-optional --omit=optional --include=dev --lockfile-version 1 || exit 1
|
||||
bun install --no-optional --omit=optional --include=dev --lockfile-version 1 || exit 1
|
||||
else
|
||||
log "Installing production dependencies"
|
||||
npm ci --no-optional --omit=optional --omit=dev --lockfile-version 1 --production || exit 1
|
||||
bun install --no-optional --omit=optional --omit=dev --lockfile-version 1 --production || exit 1
|
||||
fi
|
||||
|
||||
# Remove all minified data to force node creating it new
|
||||
|
|
|
@ -14,7 +14,7 @@ cd /D node_modules
|
|||
mklink /D "ep_etherpad-lite" "..\src"
|
||||
|
||||
cd /D "ep_etherpad-lite"
|
||||
cmd /C npm ci || exit /B 1
|
||||
cmd /C bun install --frozen-lockfile || exit /B 1
|
||||
|
||||
cd /D "%~dp0\..\.."
|
||||
|
||||
|
|
|
@ -32,4 +32,4 @@ src/bin/installDeps.sh "$@" || exit 1
|
|||
# Move to the node folder and start
|
||||
log "Starting Etherpad..."
|
||||
|
||||
exec node src/node/server.js "$@"
|
||||
exec bun run src/node/server.js "$@"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue