-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for bun as a webapp package manager (#800)
This is working off pull request "[Add support for pnpm as a webapp build tool. #767](https://git.vdb.to/cerc-io/stack-orchestrator/pulls/767/files)" that adds `pnpm` package manager support for `nextjs` & `webapps`. `bun` default build output directory (defined as `CERC_BUILD_OUTPUT_DIR`) is `dist` which should already be handled with `pnpm` support in the previously mentioned [pull request](https://git.vdb.to/cerc-io/stack-orchestrator/pulls/767/files) Installing `bun` using `npm` following our previous `pnpm` installation ```zsh npm install -g bun ``` We'll be using `bun` as a package manager that works with `Node.js` projects as defined in bun's [docs](https://bun.sh/docs/cli/install) > The bun CLI contains a Node.js-compatible package manager designed to be a dramatically faster replacement for npm, yarn, and pnpm. It's a standalone tool that will work in pre-existing Node.js projects; if your project has a package.json, bun install can help you speed up your workflow. To test `next.js` apps using `node.js` and compatibility with all four packager managers -- `npm`, `yarn`, `pnpm`, and `bun` -- use the branches of snowball's [nextjs-package-manager-example-app](https://git.vdb.to/snowball/nextjs-package-manager-example-app) repo: `nextjs-package-manager/npm`, `nextjs-package-manager/yarn`, `nextjs-package-manager/pnpm`, `nextjs-package-manager/bun`. Co-authored-by: Vivian Phung <[email protected]> Co-authored-by: David Boreham <[email protected]> Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/800 Reviewed-by: David Boreham <[email protected]> Co-authored-by: VPhung24 <[email protected]> Co-committed-by: VPhung24 <[email protected]>
- Loading branch information
1 parent
36d4969
commit 3b94220
Showing
6 changed files
with
12 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 [email protected]" \ | ||
&& npm cache clean --force > /dev/null 2>&1 | ||
|
||
# [Optional] Uncomment this section to install additional OS packages. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 [email protected]" \ | ||
&& npm cache clean --force > /dev/null 2>&1 | ||
|
||
# [Optional] Uncomment this section to install additional OS packages. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters