From 9873da041ea303d7bf432b05ef456c1d407166a4 Mon Sep 17 00:00:00 2001 From: "@mootoday" <154029656+mootoday@users.noreply.github.com> Date: Sun, 29 Dec 2024 12:32:53 +0900 Subject: [PATCH 1/5] docs: add Devbox as commumity download option --- .../site/components/Icons/Platform/Devbox.tsx | 21 +++++++++++++++++++ apps/site/components/Icons/Platform/index.ts | 3 ++- apps/site/snippets/en/download/devbox.bash | 14 +++++++++++++ apps/site/types/release.ts | 8 ++++++- apps/site/util/downloadUtils.tsx | 9 ++++++++ packages/i18n/locales/en.json | 1 + 6 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 apps/site/components/Icons/Platform/Devbox.tsx create mode 100644 apps/site/snippets/en/download/devbox.bash diff --git a/apps/site/components/Icons/Platform/Devbox.tsx b/apps/site/components/Icons/Platform/Devbox.tsx new file mode 100644 index 0000000000000..38f29a9b68551 --- /dev/null +++ b/apps/site/components/Icons/Platform/Devbox.tsx @@ -0,0 +1,21 @@ +import type { FC, SVGProps } from 'react'; + +const Choco: FC> = props => ( + + + +); + +export default Choco; diff --git a/apps/site/components/Icons/Platform/index.ts b/apps/site/components/Icons/Platform/index.ts index 8e362d2bdaf6d..9b5c22aeb07e7 100644 --- a/apps/site/components/Icons/Platform/index.ts +++ b/apps/site/components/Icons/Platform/index.ts @@ -1,7 +1,8 @@ import Choco from '@/components/Icons/Platform/Choco'; +import Devbox from '@/components/Icons/Platform/Devbox'; import Docker from '@/components/Icons/Platform/Docker'; import FNM from '@/components/Icons/Platform/FNM'; import Homebrew from '@/components/Icons/Platform/Homebrew'; import NVM from '@/components/Icons/Platform/NVM'; -export default { Choco, Docker, FNM, Homebrew, NVM }; +export default { Choco, Devbox, Docker, FNM, Homebrew, NVM }; diff --git a/apps/site/snippets/en/download/devbox.bash b/apps/site/snippets/en/download/devbox.bash new file mode 100644 index 0000000000000..791e40fb4c71c --- /dev/null +++ b/apps/site/snippets/en/download/devbox.bash @@ -0,0 +1,14 @@ +# Download and install Devbox +curl -fsSL https://get.jetify.com/devbox | bash + +# Initialize Devbox in your project +devbox init + +# Download and install Node.js: +devbox add node@${props.release.major} + +# Open a Devbox shell +devbox shell + +# Verify the Node.js version: +node -v # Should print "${props.release.versionWithPrefix}". diff --git a/apps/site/types/release.ts b/apps/site/types/release.ts index 3ac64a633d340..ec8333c75ea01 100644 --- a/apps/site/types/release.ts +++ b/apps/site/types/release.ts @@ -2,7 +2,13 @@ import type { DownloadSnippet } from '@/types/downloads'; import type { NodeRelease } from '@/types/releases'; import type { UserOS, UserPlatform } from '@/types/userOS'; -export type InstallationMethod = 'NVM' | 'FNM' | 'BREW' | 'DOCKER' | 'CHOCO'; +export type InstallationMethod = + | 'NVM' + | 'FNM' + | 'BREW' + | 'DEVBOX' + | 'DOCKER' + | 'CHOCO'; export type PackageManager = 'NPM' | 'YARN' | 'PNPM'; // Items with a pipe/default value mean that they are auto inferred diff --git a/apps/site/util/downloadUtils.tsx b/apps/site/util/downloadUtils.tsx index 7b756641f4d3c..2fa74a50b7f84 100644 --- a/apps/site/util/downloadUtils.tsx +++ b/apps/site/util/downloadUtils.tsx @@ -32,6 +32,7 @@ export enum InstallationMethodLabel { FNM = 'fnm', BREW = 'Brew', CHOCO = 'Chocolatey', + DEVBOX = 'Devbox', DOCKER = 'Docker', } @@ -182,6 +183,14 @@ export const INSTALL_METHODS: Array< url: 'https://brew.sh/', info: 'layouts.download.codeBox.platformInfo.brew', }, + { + label: InstallationMethodLabel.DEVBOX, + value: 'DEVBOX', + compatibility: { os: ['WIN', 'MAC', 'LINUX'] }, + iconImage: , + url: 'https://github.com/jetify-com/devbox', + info: 'layouts.download.codeBox.platformInfo.devbox', + }, { label: InstallationMethodLabel.CHOCO, value: 'CHOCO', diff --git a/packages/i18n/locales/en.json b/packages/i18n/locales/en.json index 9d6aff319e36f..42989e9d9b7ef 100644 --- a/packages/i18n/locales/en.json +++ b/packages/i18n/locales/en.json @@ -271,6 +271,7 @@ "fnm": "\"fnm\" is a cross-platform Node.js version manager.", "brew": "Homebrew is a package manager for macOS and Linux.", "choco": "Chocolatey is a package manager for Windows.", + "devbox": "Devbox creates isolated, reproducible development environments.", "docker": "Docker is a containerization platform." } } From 8172f30fac9ad61d7157386e161a2f14a1a65107 Mon Sep 17 00:00:00 2001 From: "@mootoday" <154029656+mootoday@users.noreply.github.com> Date: Sat, 28 Dec 2024 22:54:54 -0800 Subject: [PATCH 2/5] Update apps/site/components/Icons/Platform/Devbox.tsx Co-authored-by: Michael Esteban Signed-off-by: @mootoday <154029656+mootoday@users.noreply.github.com> --- apps/site/components/Icons/Platform/Devbox.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/site/components/Icons/Platform/Devbox.tsx b/apps/site/components/Icons/Platform/Devbox.tsx index 38f29a9b68551..a5100b77cb370 100644 --- a/apps/site/components/Icons/Platform/Devbox.tsx +++ b/apps/site/components/Icons/Platform/Devbox.tsx @@ -1,6 +1,6 @@ import type { FC, SVGProps } from 'react'; -const Choco: FC> = props => ( +const Devbox: FC> = props => ( Date: Sat, 28 Dec 2024 22:55:01 -0800 Subject: [PATCH 3/5] Update apps/site/components/Icons/Platform/Devbox.tsx Co-authored-by: Michael Esteban Signed-off-by: @mootoday <154029656+mootoday@users.noreply.github.com> --- apps/site/components/Icons/Platform/Devbox.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/site/components/Icons/Platform/Devbox.tsx b/apps/site/components/Icons/Platform/Devbox.tsx index a5100b77cb370..5f04deead0318 100644 --- a/apps/site/components/Icons/Platform/Devbox.tsx +++ b/apps/site/components/Icons/Platform/Devbox.tsx @@ -18,4 +18,4 @@ const Devbox: FC> = props => ( ); -export default Choco; +export default Devbox; From 48e9ee4aaeea0ebb2104b73c33a750984e6df38c Mon Sep 17 00:00:00 2001 From: "@mootoday" <154029656+mootoday@users.noreply.github.com> Date: Mon, 30 Dec 2024 10:20:55 +0900 Subject: [PATCH 4/5] chore: add Devbox platform icon story --- apps/site/components/__design__/platform-logos.stories.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/site/components/__design__/platform-logos.stories.tsx b/apps/site/components/__design__/platform-logos.stories.tsx index 18f1adfd45d19..774c5f486e208 100644 --- a/apps/site/components/__design__/platform-logos.stories.tsx +++ b/apps/site/components/__design__/platform-logos.stories.tsx @@ -16,6 +16,7 @@ export const PlatformLogos: StoryObj = { +
From 793858acaa47d97c8a67ae57bf4ae8ddae6696a0 Mon Sep 17 00:00:00 2001 From: Mike <154029656+mootoday@users.noreply.github.com> Date: Mon, 30 Dec 2024 04:08:12 -0800 Subject: [PATCH 5/5] Update apps/site/util/downloadUtils.tsx Co-authored-by: Augustin Mauroy Signed-off-by: Mike <154029656+mootoday@users.noreply.github.com> --- apps/site/util/downloadUtils.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/site/util/downloadUtils.tsx b/apps/site/util/downloadUtils.tsx index 2fa74a50b7f84..28be443df286b 100644 --- a/apps/site/util/downloadUtils.tsx +++ b/apps/site/util/downloadUtils.tsx @@ -188,7 +188,7 @@ export const INSTALL_METHODS: Array< value: 'DEVBOX', compatibility: { os: ['WIN', 'MAC', 'LINUX'] }, iconImage: , - url: 'https://github.com/jetify-com/devbox', + url: 'https://jetify.com/devbox/', info: 'layouts.download.codeBox.platformInfo.devbox', }, {