Add support for bun as a webapp package manager #800
@ -28,6 +28,8 @@ RUN \
|
||||
&& su ${USERNAME} -c "umask 0002 && npm install -g semver" \
|
||||
# Install pnpm
|
||||
&& su ${USERNAME} -c "umask 0002 && npm install -g pnpm" \
|
||||
# Install bun
|
||||
&& su ${USERNAME} -c "umask 0002 && npm install -g bun@1.1.x" \
|
||||
dboreham marked this conversation as resolved
|
||||
&& npm cache clean --force > /dev/null 2>&1
|
||||
|
||||
# [Optional] Uncomment this section to install additional OS packages.
|
||||
|
@ -14,6 +14,8 @@ if [ -z "$CERC_BUILD_TOOL" ]; then
|
||||
CERC_BUILD_TOOL=pnpm
|
||||
elif [ -f "yarn.lock" ]; then
|
||||
CERC_BUILD_TOOL=yarn
|
||||
elif [ -f "bun.lockb" ]; then
|
||||
CERC_BUILD_TOOL=bun
|
||||
else
|
||||
CERC_BUILD_TOOL=npm
|
||||
fi
|
||||
|
@ -13,6 +13,8 @@ if [ -z "$CERC_BUILD_TOOL" ]; then
|
||||
CERC_BUILD_TOOL=pnpm
|
||||
elif [ -f "yarn.lock" ]; then
|
||||
CERC_BUILD_TOOL=yarn
|
||||
elif [ -f "bun.lockb" ]; then
|
||||
CERC_BUILD_TOOL=bun
|
||||
else
|
||||
CERC_BUILD_TOOL=npm
|
||||
fi
|
||||
|
@ -20,6 +20,8 @@ if [ -z "$CERC_BUILD_TOOL" ]; then
|
||||
CERC_BUILD_TOOL=pnpm
|
||||
elif [ -f "yarn.lock" ]; then
|
||||
CERC_BUILD_TOOL=yarn
|
||||
elif [ -f "bun.lockb" ]; then
|
||||
CERC_BUILD_TOOL=bun
|
||||
else
|
||||
CERC_BUILD_TOOL=npm
|
||||
fi
|
||||
|
@ -28,6 +28,8 @@ RUN \
|
||||
&& su ${USERNAME} -c "umask 0002 && npm install -g semver" \
|
||||
# Install pnpm
|
||||
&& su ${USERNAME} -c "umask 0002 && npm install -g pnpm" \
|
||||
# Install bun
|
||||
&& su ${USERNAME} -c "umask 0002 && npm install -g bun@1.1.x" \
|
||||
&& npm cache clean --force > /dev/null 2>&1
|
||||
|
||||
# [Optional] Uncomment this section to install additional OS packages.
|
||||
|
@ -27,6 +27,8 @@ elif [ -f "${WORK_DIR}/package.json" ]; then
|
||||
CERC_BUILD_TOOL=pnpm
|
||||
elif [ -f "yarn.lock" ]; then
|
||||
CERC_BUILD_TOOL=yarn
|
||||
elif [ -f "bun.lockb" ]; then
|
||||
CERC_BUILD_TOOL=bun
|
||||
else
|
||||
CERC_BUILD_TOOL=npm
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user
couldn't all these npm installs be combined?
su ${USERNAME} -c "umask 0002 && npm install -g bun@1.1.x semver pnpm"
I don't actually know if it would work, just an idea
As a guest contributor (plus as my first pull request and docker noob), I followed @telackey (approved by @dboreham) code style from the pnpm pull request & current code.
@telackey @dboreham your call.
Running npm several times is probably not much slower than running it once to install several packages.
The more important issue is to run all the commands in the same docker layer, which is being done.